[gnome-games/wip/exalm/ds-popover: 26/30] Quick switch button
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/ds-popover: 26/30] Quick switch button
- Date: Fri, 18 Jan 2019 20:19:18 +0000 (UTC)
commit 7cb35c3dac9766b0c5c210326d4aac412e0daee6
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Fri Jan 18 18:44:32 2019 +0500
Quick switch button
plugins/nintendo-ds/data/icons/temp/1-bottom.svg | 67 ++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/1-top.svg | 67 ++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/2-bottom.svg | 67 ++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/2-top.svg | 67 ++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/3-bottom.svg | 73 ++++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/3-top.svg | 73 ++++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/4-bottom.svg | 73 ++++++++++++++++++++++
plugins/nintendo-ds/data/icons/temp/4-top.svg | 73 ++++++++++++++++++++++
.../data/icons/view-bottom-screen-symbolic.svg | 73 ++++++++++++++++++++++
.../data/icons/view-top-screen-symbolic.svg | 73 ++++++++++++++++++++++
plugins/nintendo-ds/data/nintendo-ds.gresource.xml | 2 +
.../data/ui/nintendo-ds-layout-switcher.ui | 61 ++++++++++++++----
.../src/nintendo-ds-layout-switcher.vala | 18 +++++-
13 files changed, 774 insertions(+), 13 deletions(-)
---
diff --git a/plugins/nintendo-ds/data/icons/temp/1-bottom.svg
b/plugins/nintendo-ds/data/icons/temp/1-bottom.svg
new file mode 100644
index 00000000..bd5c6344
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/1-bottom.svg
@@ -0,0 +1,67 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="view-bottom-screen-symbolic.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="45.254834"
+ inkscape:cx="9.0705876"
+ inkscape:cy="7.8629107"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 13,6 c 0.942809,0 1.999979,1.057191 2,2 v 5 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 8 C 7.057191,15
6.000021,13.942809 6,13 V 8 C 5.999979,7.057191 7.057191,6 8,6 Z m 0,2 H 8 v 5 h 5 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="M 1,1 H 2 C 2.257,1 2.528,1.13 2.719,1.313 L 4,2.592 5.281,1.312 C 5.471,1.129 5.743,0.999 6,0.999 h
1 v 1 C 7,2.309 6.91,2.551 6.719,2.749 L 4,5.406 1.281,2.75 C 1.091,2.552 1,2.31 1,2 Z" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/1-top.svg b/plugins/nintendo-ds/data/icons/temp/1-top.svg
new file mode 100644
index 00000000..92e8094c
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/1-top.svg
@@ -0,0 +1,67 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="view-top-screen-symbolic.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="45.254834"
+ inkscape:cx="9.0630107"
+ inkscape:cy="7.8692679"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 13,9.999 c 0.942809,0 1.999979,-1.057191 2,-2 v -5 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 H 8 c
-0.942809,0 -1.999979,1.057191 -2,2 v 5 c -2.1e-5,0.942809 1.057191,2 2,2 z m 0,-2 H 8 v -5 h 5 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="m 1,14.999 h 1 c 0.257,0 0.528,-0.13 0.719,-0.313 L 4,13.407 5.281,14.687 C 5.471,14.87 5.743,15
6,15 H 7 V 14 C 7,13.69 6.91,13.448 6.719,13.25 L 4,10.593 1.281,13.249 C 1.091,13.447 1,13.689 1,13.999 Z" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/2-bottom.svg
b/plugins/nintendo-ds/data/icons/temp/2-bottom.svg
new file mode 100644
index 00000000..796bdc63
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/2-bottom.svg
@@ -0,0 +1,67 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="2-bottom.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="45.254834"
+ inkscape:cx="4.5993991"
+ inkscape:cy="7.7808796"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,6 c 0.942809,0 1.999979,1.057191 2,2 v 5 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 4 C 3.057191,15
2.000021,13.942809 2,13 V 8 C 1.999979,7.057191 3.057191,6 4,6 Z m 0,2 H 4 v 5 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="M 5,1 H 6 C 6.257,1 6.528,1.13 6.719,1.313 L 8,2.592 9.281,1.312 C 9.471,1.129 9.743,0.999 10,0.999
h 1 v 1 c 0,0.31 -0.09,0.552 -0.281,0.75 L 8,5.406 5.281,2.75 C 5.091,2.552 5,2.31 5,2 Z" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/2-top.svg b/plugins/nintendo-ds/data/icons/temp/2-top.svg
new file mode 100644
index 00000000..6fd01d75
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/2-top.svg
@@ -0,0 +1,67 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="2-top.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="45.254834"
+ inkscape:cx="4.5993991"
+ inkscape:cy="7.7808796"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,9.999 c 0.942809,0 1.999979,-1.057191 2,-2 v -5 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 H 4 c
-0.942809,0 -1.999979,1.057191 -2,2 v 5 c -2.1e-5,0.942809 1.057191,2 2,2 z m 0,-2 H 4 v -5 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="m 5,14.999 h 1 c 0.257,0 0.528,-0.13 0.719,-0.313 L 8,13.407 9.281,14.687 C 9.471,14.87 9.743,15
10,15 h 1 v -1 c 0,-0.31 -0.09,-0.552 -0.281,-0.75 L 8,10.593 5.281,13.249 C 5.091,13.447 5,13.689 5,13.999
Z" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/3-bottom.svg
b/plugins/nintendo-ds/data/icons/temp/3-bottom.svg
new file mode 100644
index 00000000..a30a34c9
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/3-bottom.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="3-bottom.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="22.627417"
+ inkscape:cx="12.825354"
+ inkscape:cy="3.4158177"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,6 c 0.942809,0 1.999979,1.057191 2,2 v 5 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 4 C 3.057191,15
2.000021,13.942809 2,13 V 8 C 1.999979,7.057191 3.057191,6 4,6 Z m 0,2 H 4 v 5 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="M 5,1 H 6 C 6.257,1 6.528,1.13 6.719,1.313 L 8,2.592 9.281,1.312 C 9.471,1.129 9.743,0.999 10,0.999
h 1 v 1 c 0,0.31 -0.09,0.552 -0.281,0.75 L 8,5.406 5.281,2.75 C 5.091,2.552 5,2.31 5,2 Z" />
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,7.999 v -7 h 2 v 7 z m 10,0 v -7 h 2 v 7 z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/3-top.svg b/plugins/nintendo-ds/data/icons/temp/3-top.svg
new file mode 100644
index 00000000..1d0b5618
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/3-top.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="3-top.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="22.627417"
+ inkscape:cx="12.825354"
+ inkscape:cy="3.4158177"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,9.999 c 0.942809,0 1.999979,-1.057191 2,-2 v -5 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 H 4 c
-0.942809,0 -1.999979,1.057191 -2,2 v 5 c -2.1e-5,0.942809 1.057191,2 2,2 z m 0,-2 H 4 v -5 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="m 5,14.999 h 1 c 0.257,0 0.528,-0.13 0.719,-0.313 L 8,13.407 9.281,14.687 C 9.471,14.87 9.743,15
10,15 h 1 v -1 c 0,-0.31 -0.09,-0.552 -0.281,-0.75 L 8,10.593 5.281,13.249 C 5.091,13.447 5,13.689 5,13.999
Z" />
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,8 v 7 H 4 V 8 Z m 10,0 v 7 h 2 V 8 Z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/4-bottom.svg
b/plugins/nintendo-ds/data/icons/temp/4-bottom.svg
new file mode 100644
index 00000000..68e095d7
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/4-bottom.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="4-bottom.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="32"
+ inkscape:cx="7.8674575"
+ inkscape:cy="8.8862104"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,10.999 c 0.942809,0 1.999979,-1.057191 2,-2 v -6 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 H 4 c
-0.942809,0 -1.999979,1.057191 -2,2 v 6 c -2.1e-5,0.942809 1.057191,2 2,2 z m 0,-2 H 4 v -6 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="M 5,4 H 6 C 6.257,4 6.528,4.13 6.719,4.313 L 8,5.592 9.281,4.312 C 9.471,4.129 9.743,3.999 10,3.999
h 1 v 1 c 0,0.31 -0.09,0.552 -0.281,0.75 L 8,8.406 5.281,5.75 C 5.091,5.552 5,5.31 5,5 Z" />
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,8 v 7 H 4 V 8 Z m 10,0 v 7 h 2 V 8 Z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/temp/4-top.svg b/plugins/nintendo-ds/data/icons/temp/4-top.svg
new file mode 100644
index 00000000..b3762da4
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/temp/4-top.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="4-top.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="32"
+ inkscape:cx="7.8674575"
+ inkscape:cy="8.8862104"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,5 c 0.942809,0 1.999979,1.057191 2,2 v 6 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 4 C 3.057191,15
2.000021,13.942809 2,13 V 7 C 1.999979,6.057191 3.057191,5 4,5 Z m 0,2 H 4 v 6 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="m 5,11.999 h 1 c 0.257,0 0.528,-0.13 0.719,-0.313 L 8,10.407 9.281,11.687 C 9.471,11.87 9.743,12
10,12 h 1 v -1 c 0,-0.31 -0.09,-0.552 -0.281,-0.75 L 8,7.593 5.281,10.249 C 5.091,10.447 5,10.689 5,10.999 Z"
/>
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,7.999 v -7 h 2 v 7 z m 10,0 v -7 h 2 v 7 z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/view-bottom-screen-symbolic.svg
b/plugins/nintendo-ds/data/icons/view-bottom-screen-symbolic.svg
new file mode 100644
index 00000000..68e095d7
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/view-bottom-screen-symbolic.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="4-bottom.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="32"
+ inkscape:cx="7.8674575"
+ inkscape:cy="8.8862104"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,10.999 c 0.942809,0 1.999979,-1.057191 2,-2 v -6 c 2.1e-5,-0.942809 -1.057191,-2 -2,-2 H 4 c
-0.942809,0 -1.999979,1.057191 -2,2 v 6 c -2.1e-5,0.942809 1.057191,2 2,2 z m 0,-2 H 4 v -6 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="M 5,4 H 6 C 6.257,4 6.528,4.13 6.719,4.313 L 8,5.592 9.281,4.312 C 9.471,4.129 9.743,3.999 10,3.999
h 1 v 1 c 0,0.31 -0.09,0.552 -0.281,0.75 L 8,8.406 5.281,5.75 C 5.091,5.552 5,5.31 5,5 Z" />
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,8 v 7 H 4 V 8 Z m 10,0 v 7 h 2 V 8 Z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/icons/view-top-screen-symbolic.svg
b/plugins/nintendo-ds/data/icons/view-top-screen-symbolic.svg
new file mode 100644
index 00000000..b3762da4
--- /dev/null
+++ b/plugins/nintendo-ds/data/icons/view-top-screen-symbolic.svg
@@ -0,0 +1,73 @@
+<?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"
+ width="16"
+ height="16"
+ version="1.1"
+ id="svg8"
+ sodipodi:docname="4-top.svg"
+ inkscape:version="0.92.2 2405546, 2018-03-11">
+ <metadata
+ id="metadata14">
+ <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>
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ id="namedview10"
+ showgrid="true"
+ inkscape:zoom="32"
+ inkscape:cx="7.8674575"
+ inkscape:cy="8.8862104"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg8">
+ <inkscape:grid
+ type="xygrid"
+ id="grid4526" />
+ </sodipodi:namedview>
+ <path
+ sodipodi:nodetypes="sccssccssccccc"
+ inkscape:connector-curvature="0"
+ id="path817"
+ d="m 12,5 c 0.942809,0 1.999979,1.057191 2,2 v 6 c 2.1e-5,0.942809 -1.057191,2 -2,2 H 4 C 3.057191,15
2.000021,13.942809 2,13 V 7 C 1.999979,6.057191 3.057191,5 4,5 Z m 0,2 H 4 v 6 h 8 z"
+
style="fill:#474747;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
/>
+ <path
+ inkscape:connector-curvature="0"
+ id="path1069"
+ overflow="visible"
+ font-weight="400"
+ style="color:#bebebe;font-weight:400;line-height:normal;font-family:'Bitstream Vera
Sans';-inkscape-font-specification:'Bitstream Vera
Sans';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-transform:none;overflow:visible;fill:#474747;marker:none"
+ d="m 5,11.999 h 1 c 0.257,0 0.528,-0.13 0.719,-0.313 L 8,10.407 9.281,11.687 C 9.471,11.87 9.743,12
10,12 h 1 v -1 c 0,-0.31 -0.09,-0.552 -0.281,-0.75 L 8,7.593 5.281,10.249 C 5.091,10.447 5,10.689 5,10.999 Z"
/>
+ <path
+
style="opacity:0.5;fill:#474747;fill-opacity:1;stroke:none;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 2,7.999 v -7 h 2 v 7 z m 10,0 v -7 h 2 v 7 z"
+ id="path1685"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccc" />
+</svg>
diff --git a/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
b/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
index 41429a0b..135d986e 100644
--- a/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
+++ b/plugins/nintendo-ds/data/nintendo-ds.gresource.xml
@@ -7,5 +7,7 @@
<file>icons/screen-layout-quick-switch-symbolic.svg</file>
<file>icons/screen-layout-right-left-symbolic.svg</file>
<file>icons/screen-layout-top-bottom-symbolic.svg</file>
+ <file>icons/view-bottom-screen-symbolic.svg</file>
+ <file>icons/view-top-screen-symbolic.svg</file>
</gresource>
</gresources>
diff --git a/plugins/nintendo-ds/data/ui/nintendo-ds-layout-switcher.ui
b/plugins/nintendo-ds/data/ui/nintendo-ds-layout-switcher.ui
index 882d828e..bc02fac9 100644
--- a/plugins/nintendo-ds/data/ui/nintendo-ds-layout-switcher.ui
+++ b/plugins/nintendo-ds/data/ui/nintendo-ds-layout-switcher.ui
@@ -1,21 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.16"/>
- <template class="GamesNintendoDsLayoutSwitcher" parent="GtkMenuButton">
+ <template class="GamesNintendoDsLayoutSwitcher" parent="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="popover">layout_popover</property>
- <style>
- <class name="image-button"/>
- </style>
- <child internal-child="accessible">
- <object class="AtkObject" id="a11y-display-discs">
- <property name="accessible-name" translatable="yes">Screen Layout</property>
+
+ <child>
+ <object class="GtkRevealer" id="change_screen_revealer">
+ <property name="visible">True</property>
+ <property name="transition-type">slide-left</property>
+ <child>
+ <object class="GtkButton">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="margin-right">6</property>
+ <signal name="clicked" handler="on_screen_changed"/>
+ <child internal-child="accessible">
+ <object class="AtkObject">
+ <property name="accessible-name" translatable="yes">Change Screen</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage" id="change_screen_image">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkImage" id="layout_image">
+ <object class="GtkMenuButton">
<property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="popover">layout_popover</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="a11y-display-discs">
+ <property name="accessible-name" translatable="yes">Screen Layout</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="layout_image">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon-name">pan-down-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
</template>
@@ -26,7 +65,7 @@
<property name="visible">True</property>
<property name="margin">6</property>
<property name="homogeneous">True</property>
- <property name="max-children-per-line">2</property>
+ <property name="max-children-per-line">4</property>
<signal name="child-activated" handler="on_item_activated"/>
</object>
</child>
diff --git a/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
b/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
index 96c2c338..48ad9ec7 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
@@ -1,7 +1,11 @@
// This file is part of GNOME Games. License: GPL-3.0+.
[GtkTemplate (ui = "/org/gnome/Games/plugins/nintendo-ds/ui/nintendo-ds-layout-switcher.ui")]
-private class Games.NintendoDsLayoutSwitcher : Gtk.MenuButton {
+private class Games.NintendoDsLayoutSwitcher : Gtk.Box {
+ [GtkChild]
+ private Gtk.Revealer change_screen_revealer;
+ [GtkChild]
+ private Gtk.Image change_screen_image;
[GtkChild]
private Gtk.Image layout_image;
[GtkChild]
@@ -46,12 +50,22 @@ private class Games.NintendoDsLayoutSwitcher : Gtk.MenuButton {
private void update_ui () {
var layout = settings.get_string ("screen-layout");
+ var view_bottom = settings.get_boolean ("view-bottom-screen");
layout_image.icon_name = get_layout_icon (layout);
var item = items[layout];
-
flow_box.select_child (item);
+
+ change_screen_revealer.reveal_child = (layout == "quick switch");
+ change_screen_image.icon_name = view_bottom ? "view-top-screen-symbolic" :
"view-bottom-screen-symbolic-symbolic";
+ }
+
+ [GtkCallback]
+ private void on_screen_changed (Gtk.Button button) {
+ var view_bottom = settings.get_boolean ("view-bottom-screen");
+
+ settings.set_boolean ("view-bottom-screen", !view_bottom);
}
[GtkCallback]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]