[gnome-control-center] wacom: Improve alignment of lines and widgets



commit e3dbbef4807f70ae511f3be402c378f0411f19ca
Author: Jakub Steiner <jimmac gmail com>
Date:   Thu Sep 1 15:08:12 2011 +0200

    wacom: Improve alignment of lines and widgets
    
    Use SVG image instead of PNG so that it will scale with the font size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657425

 panels/wacom/Makefile.am      |    4 +-
 panels/wacom/cc-wacom-panel.c |    4 +-
 panels/wacom/wacom-stylus.png |  Bin 3165 -> 0 bytes
 panels/wacom/wacom-stylus.svg |  118 +++++++++++++++++++++++++++++++++++++++++
 panels/wacom/wacom-tablet.png |  Bin 2301 -> 0 bytes
 panels/wacom/wacom-tablet.svg |   80 ++++++++++++++++++++++++++++
 6 files changed, 202 insertions(+), 4 deletions(-)
---
diff --git a/panels/wacom/Makefile.am b/panels/wacom/Makefile.am
index 6c81ead..a9ba8b7 100644
--- a/panels/wacom/Makefile.am
+++ b/panels/wacom/Makefile.am
@@ -26,8 +26,8 @@ libwacom_properties_la_LDFLAGS = $(PANEL_LDFLAGS)
 
 pixmapdir = $(pkgdatadir)/pixmaps
 pixmap_DATA = \
-	wacom-tablet.png \
-	wacom-stylus.png
+	wacom-tablet.svg \
+	wacom-stylus.svg
 
 uidir   = $(pkgdatadir)/ui
 ui_DATA = gnome-wacom-properties.ui
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index 7afc364..76eec1c 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -441,8 +441,8 @@ cc_wacom_panel_init (CcWacomPanel *self)
 	set_feel_from_gsettings (GTK_ADJUSTMENT (WID ("adjustment-tip-feel")), priv->stylus_settings);
 	set_feel_from_gsettings (GTK_ADJUSTMENT (WID ("adjustment-eraser-feel")), priv->eraser_settings);
 
-	gtk_image_set_from_file (GTK_IMAGE (WID ("image-tablet")), PIXMAP_DIR "/wacom-tablet.png");
-	gtk_image_set_from_file (GTK_IMAGE (WID ("image-stylus")), PIXMAP_DIR "/wacom-stylus.png");
+	gtk_image_set_from_file (GTK_IMAGE (WID ("image-tablet")), PIXMAP_DIR "/wacom-tablet.svg");
+	gtk_image_set_from_file (GTK_IMAGE (WID ("image-stylus")), PIXMAP_DIR "/wacom-stylus.svg");
 }
 
 void
diff --git a/panels/wacom/wacom-stylus.svg b/panels/wacom/wacom-stylus.svg
new file mode 100644
index 0000000..bfaf9a3
--- /dev/null
+++ b/panels/wacom/wacom-stylus.svg
@@ -0,0 +1,118 @@
+<?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";
+   id="svg86343"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   width="148"
+   height="192"
+   sodipodi:docname="wacom-stylus.svg">
+  <metadata
+     id="metadata86349">
+    <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="defs86347" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="796"
+     inkscape:window-height="646"
+     id="namedview86345"
+     showgrid="false"
+     inkscape:snap-nodes="false"
+     inkscape:snap-bbox="true"
+     inkscape:zoom="1"
+     inkscape:cx="81.933505"
+     inkscape:cy="125.31211"
+     inkscape:window-x="2037"
+     inkscape:window-y="328"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg86343">
+    <inkscape:grid
+       type="xygrid"
+       id="grid86802" />
+  </sodipodi:namedview>
+  <g
+     style="display:inline"
+     transform="translate(592.43375,-287.62088)"
+     id="g10545">
+    <path
+       sodipodi:nodetypes="sscsscscccccccccscsscsss"
+       inkscape:connector-curvature="0"
+       id="rect10526"
+       transform="translate(-928.4063,-95.84375)"
+       d="m 349.69531,384.96463 c -2.3083,0 -3.2326,1.49535 -3.69531,4.51323 L 345.53125,396 344.125,396 c -1.9944,0 -3.59375,1.59935 -3.59375,3.59375 L 340.53125,516 338,545.125 c -0.1873,2.15512 1.62589,3.92035 3.75,4.125 l 4.625,10.90625 1.53125,0 0,2.15625 5.25,12.375 5.25,-12.34375 0,-2.1875 1.53125,0 4.65625,-10.96875 c 1.96694,-0.35188 3.54637,-2.02216 3.40625,-4.0625 L 365.53125,516 l 0,-116.40625 c 0,-1.9944 -1.59935,-3.59375 -3.59375,-3.59375 l -1.40625,0 L 360,389.47786 c -0.23272,-2.85711 -1.26201,-4.51323 -3.69531,-4.51323 z"
+       style="color:#000000;fill:#d3d7cf;fill-opacity:1;fill-rule:nonzero;stroke:#babdb6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+    <rect
+       style="color:#000000;fill:#eeeeec;fill-opacity:1;fill-rule:nonzero;stroke:#babdb6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect10541"
+       width="8.75"
+       height="22"
+       x="-579.65631"
+       y="385.90625"
+       rx="3.25"
+       ry="3.25" />
+    <rect
+       ry="3.2500002"
+       rx="3.25"
+       y="410.90625"
+       x="-579.65631"
+       height="12.25"
+       width="8.75"
+       id="rect10543"
+       style="color:#000000;fill:#eeeeec;fill-opacity:1;fill-rule:nonzero;stroke:#babdb6;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+  </g>
+  <g
+     style="opacity:0.2;display:inline"
+     id="g10631"
+     transform="translate(592.43375,-302.48416)">
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 352,493 40,0 0,-38 83,0"
+       id="path10552"
+       inkscape:connector-curvature="0"
+       transform="translate(-928.4063,-79.84375)"
+       sodipodi:nodetypes="cccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       inkscape:connector-curvature="0"
+       id="path10556"
+       d="m -577.4063,309.15625 41,0 0,19 83,0"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m -573.4063,489.15625 37,0 0,-15 83,0"
+       id="path10629"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       inkscape:connector-curvature="0"
+       id="path86913"
+       d="m -573.4063,430.15625 37,0 0,-5 83,0"
+       style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+  </g>
+</svg>
diff --git a/panels/wacom/wacom-tablet.svg b/panels/wacom/wacom-tablet.svg
new file mode 100644
index 0000000..c731a15
--- /dev/null
+++ b/panels/wacom/wacom-tablet.svg
@@ -0,0 +1,80 @@
+<?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";
+   id="svg86858"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   width="136"
+   height="95"
+   sodipodi:docname="wacom-tablet.svg">
+  <metadata
+     id="metadata86864">
+    <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="defs86862" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1199"
+     inkscape:window-height="807"
+     id="namedview86860"
+     showgrid="false"
+     borderlayer="true"
+     inkscape:showpageshadow="false"
+     inkscape:zoom="1"
+     inkscape:cx="102.86277"
+     inkscape:cy="29.101803"
+     inkscape:window-x="1873"
+     inkscape:window-y="310"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg86858">
+    <inkscape:grid
+       type="xygrid"
+       id="grid86892"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <g
+     style="display:inline"
+     transform="matrix(0.59415025,0,0,0.67531282,405.44733,-74.059104)"
+     id="g4353-0">
+    <path
+       style="fill:#d3d7cf;fill-opacity:1;stroke:#babdb6;stroke-width:1.57869911px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m -671.84869,114.6834 -4.59602,121.59096 c 32.72217,9.76806 147.85417,10.09218 184.07682,0 l -4.59602,-121.59096 z"
+       id="path3568-6"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <rect
+       style="color:#000000;fill:#babdb6;fill-opacity:1;fill-rule:nonzero;stroke:#babdb6;stroke-width:1.57869887;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       id="rect10889"
+       width="126.79845"
+       height="82.952255"
+       x="-647.31793"
+       y="129.88136" />
+  </g>
+</svg>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]