mirror-chatterino2/resources/switcher/switch.svg

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

105 lines
3.5 KiB
XML
Raw Permalink Normal View History

Discord-like Quick Switcher (#1588) * Proof of Concept for Quick Switcher * Fix crash when suggestions are empty * QuickSwitcher: Use tab name instead of a single channel * Rebase later * Add missing include for <functional> * Move QuickSwitcher related classes into own subfolder * Refactor switcher list items Now, items are responsible for taking the right action when selected in the switcher list. This should allow for more focused code and responsibilities. * Add note about memory management * Add option to open channel in a new tab * Add support for using the mouse * Spawn switcher popup in the middle of the window Works reliably on i3 at least. Might need some additional testing on other WMs (and especially on Windows!). * Add some icons for switcher items Note that the final design of the list is not final but I do plan to incorporate these in the future. * Set Qt::Dialog window flag on switcher popup Prevents tiling window managers like i3 from trying to tile the window. * Rename "SwitcherItem" to "AbstractSwitcherItem" * Add comments about what items are inserted * Use custom model and view Still missing: Currently selected item is not highlighted yet. You can move between selected items with tab and arrow keys though. * Add helper function to convert QVariant to AbstractSwitcherItem * * Remove useless constant * Highlight currently selected switcher item * Use a different method for centering QuickSwitcherPopup window * QuickSwitcherModel: Add documentation * Add default parameter to QuickSwitcherModel::rowCount * QuickSwitcherPopup: Add comments * Remove outdated TODO * QuickSwitcherModel: Init vector with default capacity * Remove outdated comment * Add comment about 0 ms timeout interval * NewTabItem: Simplify interface * Only fetch opened splits once This is better than the prior approach since opened splits cannot change anyways while the switcher is open. * Use SplitContainer to pass information instead of custom type * Allow searching for tab titles as well Before this commit, only channel names could be searched. * Refactor switcher item interface to be more flexible Also show tab name and channel name in the switcher list. * Add documentation for AbstractSwitcherItem * Add documentation for NewTabItem * Add comments about {begin,end}{Insert,Remove}Rows * Remove unused method * Replace magic size with named constant * Add change log entry Co-authored-by: fourtf <tf.four@gmail.com>
2020-08-13 19:25:51 +02:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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"
sodipodi:docname="switch.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 210 297"
height="297mm"
width="210mm">
<defs
id="defs2">
<inkscape:path-effect
effect="spiro"
id="path-effect846"
is_visible="true" />
<inkscape:path-effect
is_visible="true"
id="path-effect842"
effect="spiro" />
<inkscape:path-effect
only_selected="false"
apply_with_weight="true"
apply_no_weight="true"
helper_size="0"
steps="2"
weight="33.333333"
is_visible="true"
id="path-effect838"
effect="bspline" />
</defs>
<sodipodi:namedview
inkscape:document-rotation="0"
showguides="false"
inkscape:window-maximized="1"
inkscape:window-y="25"
inkscape:window-x="0"
inkscape:window-height="1053"
inkscape:window-width="1918"
inkscape:pagecheckerboard="true"
inkscape:measure-end="452.742,560.248"
inkscape:measure-start="452.742,588.189"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="518.41498"
inkscape:cx="382.6533"
inkscape:zoom="0.35"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base">
<inkscape:grid
id="grid815"
type="xygrid" />
</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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Ebene 1">
<circle
r="95.25"
cy="148.83635"
cx="105.97791"
id="path834"
style="fill:#5e5e5e;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.7112;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
transform="matrix(1.5315391,0,0,1.5315391,-51.342168,-65.4613)"
id="g1462">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path870"
d="m 64.225375,157.86151 c 0,0 36.412935,10.20456 55.562495,3.37954 v 7.39282 l 21.42726,-21.18896 -21.42722,-6.06995 v 7.39287 c -16.9044,6.0364 -55.562535,-4.13549 -55.562535,-4.13549 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.786;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.786;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 141.21513,121.98463 c 0,0 -36.41293,-10.20456 -55.562491,-3.37954 v -7.39282 l -21.42726,21.18896 21.42722,6.06995 v -7.39287 c 16.904401,-6.0364 55.562531,4.13549 55.562531,4.13549 z"
id="path880"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</g>
</svg>