Scroll Using Click-and-Drag with Middle Mouse Button (#1559)
* ChannelView: Rename mouse event related members This is more in line with the naming of the other members as well as future members. * ChannelView: Add ability to scroll with middle mouse button * Add scrolling resources * Use custom icons for scroll cursor * Slightly refactor scrolling logic * Respect screen scaling when calculating scroll offset * Nicer scrolling UX This change allows scrolling to be feel smoother when close to the starting point. * Add scrolling with keeping middle mouse pressed This mimics the behavior of browsers as well. * Refactor ChannelView::enableScrolling * Disable drag-scrolling on left or right click
This commit is contained in:
@@ -28,8 +28,9 @@
|
||||
<file>buttons/unmod.png</file>
|
||||
<file>buttons/update.png</file>
|
||||
<file>buttons/updateError.png</file>
|
||||
<file>com.chatterino.chatterino.desktop</file>
|
||||
<file>chatterino.icns</file>
|
||||
<file>com.chatterino.chatterino.appdata.xml</file>
|
||||
<file>com.chatterino.chatterino.desktop</file>
|
||||
<file>contributors.txt</file>
|
||||
<file>emoji.json</file>
|
||||
<file>emojidata.txt</file>
|
||||
@@ -50,6 +51,12 @@
|
||||
<file>licenses/websocketpp.txt</file>
|
||||
<file>pajaDank.png</file>
|
||||
<file>qss/settings.qss</file>
|
||||
<file>scrolling/downScroll.png</file>
|
||||
<file>scrolling/downScroll.svg</file>
|
||||
<file>scrolling/neutralScroll.png</file>
|
||||
<file>scrolling/neutralScroll.svg</file>
|
||||
<file>scrolling/upScroll.png</file>
|
||||
<file>scrolling/upScroll.svg</file>
|
||||
<file>settings/about.svg</file>
|
||||
<file>settings/aboutlogo.png</file>
|
||||
<file>settings/accounts.svg</file>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666665 8.4666669"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="downScroll.svg"
|
||||
inkscape:export-filename="/home/leon/Projects/Chatterino/chatterino2/resources/scrolling/neutralScroll.png"
|
||||
inkscape:export-xdpi="7.6051788"
|
||||
inkscape:export-ydpi="7.6051788">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="14.417768"
|
||||
inkscape:cy="15.865661"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1053"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
units="px"
|
||||
inkscape:pagecheckerboard="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4532" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-288.53332)">
|
||||
<circle
|
||||
style="fill:#f6f6f6;fill-opacity:1;stroke:#000000;stroke-width:0.03761128;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3719"
|
||||
cx="4.2333331"
|
||||
cy="292.76666"
|
||||
r="4.2145276" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.05049507;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4526"
|
||||
cx="4.2333317"
|
||||
cy="292.76425"
|
||||
r="0.72627902" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.56499994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4538"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="99.21875"
|
||||
sodipodi:cy="155.44792"
|
||||
sodipodi:r1="13.229166"
|
||||
sodipodi:r2="6.614583"
|
||||
sodipodi:arg1="0"
|
||||
sodipodi:arg2="1.0471976"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 112.44792,155.44792 -19.843753,11.4568 v -22.91359 z"
|
||||
inkscape:transform-center-x="5.0649804e-06"
|
||||
inkscape:transform-center-y="2.2264812"
|
||||
transform="matrix(0,0.09239709,-0.09239709,0,18.596269,286.19867)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666665 8.4666669"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="neutralScroll.svg"
|
||||
inkscape:export-filename="/home/leon/Projects/Chatterino/chatterino2/resources/scrolling/neutralScroll.png"
|
||||
inkscape:export-xdpi="7.6051788"
|
||||
inkscape:export-ydpi="7.6051788">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="25.340042"
|
||||
inkscape:cy="15.865661"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1053"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
units="px"
|
||||
inkscape:pagecheckerboard="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4532" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-288.53332)">
|
||||
<g
|
||||
id="g5271"
|
||||
transform="matrix(0.07922061,0,0,0.07922061,-4.1782222,281.17363)">
|
||||
<circle
|
||||
r="53.199886"
|
||||
cy="146.33852"
|
||||
cx="106.17888"
|
||||
id="path3719"
|
||||
style="fill:#f6f6f6;fill-opacity:1;stroke:#000000;stroke-width:0.47476631;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<g
|
||||
transform="matrix(1.7324984,0,0,1.7324984,-77.775866,-107.19273)"
|
||||
id="g4665">
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.36790693;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4526"
|
||||
cx="106.17887"
|
||||
cy="146.32092"
|
||||
r="5.2916665" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.56499994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4538"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="99.21875"
|
||||
sodipodi:cy="155.44792"
|
||||
sodipodi:r1="13.229166"
|
||||
sodipodi:r2="6.614583"
|
||||
sodipodi:arg1="0"
|
||||
sodipodi:arg2="1.0471976"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 112.44792,155.44792 -19.843753,11.4568 v -22.91359 z"
|
||||
inkscape:transform-center-x="5.0649804e-06"
|
||||
inkscape:transform-center-y="2.2264812"
|
||||
transform="matrix(0,0.67320493,-0.67320493,0,210.82719,98.484167)" />
|
||||
<path
|
||||
transform="matrix(0,-0.67320493,-0.67320493,0,210.82719,194.19287)"
|
||||
inkscape:transform-center-y="-2.2264854"
|
||||
inkscape:transform-center-x="5.0649804e-06"
|
||||
d="m 112.44792,155.44792 -19.843753,11.4568 v -22.91359 z"
|
||||
inkscape:randomized="0"
|
||||
inkscape:rounded="0"
|
||||
inkscape:flatsided="true"
|
||||
sodipodi:arg2="1.0471976"
|
||||
sodipodi:arg1="0"
|
||||
sodipodi:r2="6.614583"
|
||||
sodipodi:r1="13.229166"
|
||||
sodipodi:cy="155.44792"
|
||||
sodipodi:cx="99.21875"
|
||||
sodipodi:sides="3"
|
||||
id="path4540"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.56499994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:type="star" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 8.4666665 8.4666669"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
sodipodi:docname="upScroll.svg"
|
||||
inkscape:export-filename="/home/leon/Projects/Chatterino/chatterino2/resources/scrolling/neutralScroll.png"
|
||||
inkscape:export-xdpi="7.6051788"
|
||||
inkscape:export-ydpi="7.6051788">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.839192"
|
||||
inkscape:cx="14.417768"
|
||||
inkscape:cy="15.865661"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1053"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="0"
|
||||
units="px"
|
||||
inkscape:pagecheckerboard="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4532" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-288.53332)">
|
||||
<circle
|
||||
style="fill:#f6f6f6;fill-opacity:1;stroke:#000000;stroke-width:0.03761128;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path3719"
|
||||
cx="4.2333331"
|
||||
cy="292.76666"
|
||||
r="4.2145276" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.05049507;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4526"
|
||||
cx="4.2333317"
|
||||
cy="292.76425"
|
||||
r="0.72627902" />
|
||||
<path
|
||||
transform="matrix(0,-0.09239709,-0.09239709,0,18.596269,299.33465)"
|
||||
inkscape:transform-center-y="-2.2264854"
|
||||
inkscape:transform-center-x="5.0649804e-06"
|
||||
d="m 112.44792,155.44792 -19.843753,11.4568 v -22.91359 z"
|
||||
inkscape:randomized="0"
|
||||
inkscape:rounded="0"
|
||||
inkscape:flatsided="true"
|
||||
sodipodi:arg2="1.0471976"
|
||||
sodipodi:arg1="0"
|
||||
sodipodi:r2="6.614583"
|
||||
sodipodi:r1="13.229166"
|
||||
sodipodi:cy="155.44792"
|
||||
sodipodi:cx="99.21875"
|
||||
sodipodi:sides="3"
|
||||
id="path4540"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.56499994;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:type="star" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
Reference in New Issue
Block a user