[gbrainy] Answer area with icons + line to separate questions
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] Answer area with icons + line to separate questions
- Date: Sun, 13 Feb 2011 12:55:11 +0000 (UTC)
commit f0368d59ed8ee366b8c37f63aff8ae410194fe2a
Author: Jordi Mas <jmas softcatala org>
Date: Sun Feb 13 13:57:05 2011 +0100
Answer area with icons + line to separate questions
data/Makefile.am | 5 +-
data/app-graphics/gtk-info.svg | 129 ++++++++++++++
data/app-graphics/gtk-ok.svg | 91 ++++++++++
data/app-graphics/gtk-stop.svg | 191 +++++++++++++++++++++
src/Clients/Classical/Dialogs/HigMessageDialog.cs | 2 +-
src/Clients/Classical/Makefile.am | 4 +-
src/Clients/Classical/Widgets/GameDrawingArea.cs | 88 +++++++++-
src/Clients/Classical/gbrainy.cs | 38 +++--
src/Core/Libraries/CairoContext.cs | 2 +-
src/Games/Logic/PuzzleExtraCircle.cs | 6 +-
10 files changed, 523 insertions(+), 33 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8bc43ac..96712b9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -33,7 +33,10 @@ tango_icons = \
app-graphics/endgame-32.png \
app-graphics/allgames-32.png \
app-graphics/pause-32.png \
- app-graphics/verbal-games-32.png
+ app-graphics/verbal-games-32.png \
+ app-graphics/gtk-info.svg \
+ app-graphics/gtk-stop.svg \
+ app-graphics/gtk-ok.svg
analogies_DATA = \
diff --git a/data/app-graphics/gtk-info.svg b/data/app-graphics/gtk-info.svg
new file mode 100644
index 0000000..ef15fec
--- /dev/null
+++ b/data/app-graphics/gtk-info.svg
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="128"
+ height="128"
+ id="svg3675">
+ <defs
+ id="defs3677">
+ <linearGradient
+ id="linearGradient8838">
+ <stop
+ id="stop8840"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop8842"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2490-182-124">
+ <stop
+ id="stop2788"
+ style="stop-color:#1f4b6a;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2790"
+ style="stop-color:#4083c2;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3242-187-536">
+ <stop
+ id="stop2778"
+ style="stop-color:#8badea;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2780"
+ style="stop-color:#6396cd;stop-opacity:1"
+ offset="0.26238" />
+ <stop
+ id="stop2782"
+ style="stop-color:#3b7caf;stop-opacity:1"
+ offset="0.66093999" />
+ <stop
+ id="stop2784"
+ style="stop-color:#194c70;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4873">
+ <stop
+ id="stop4875"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4877"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="63.397362"
+ y1="-12.489107"
+ x2="63.397362"
+ y2="5.4675598"
+ id="linearGradient2407"
+ xlink:href="#linearGradient4873"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(5.64345,0,0,5.6429422,-286.50588,83.30933)" />
+ <radialGradient
+ cx="23.895569"
+ cy="3.9900031"
+ r="20.397499"
+ fx="23.895569"
+ fy="3.9900031"
+ id="radialGradient2410"
+ xlink:href="#linearGradient3242-187-536"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,6.102135,-8.0552513,0,96.659483,-138.25671)" />
+ <linearGradient
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143"
+ id="linearGradient2412"
+ xlink:href="#linearGradient2490-182-124"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.5569423,0,0,2.5567709,3.1523875,2.1353877)" />
+ <radialGradient
+ cx="62.625"
+ cy="4.625"
+ r="10.625"
+ fx="62.625"
+ fy="4.625"
+ id="radialGradient2415"
+ xlink:href="#linearGradient8838"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(5.7750605,0,0,2.0085789,-297.14415,94.222906)" />
+ </defs>
+ <path
+ d="m 125.87901,103.5126 c 0,11.7864 -27.471807,21.34118 -61.36001,21.34118 -33.888198,0 -61.3600168,-9.55478 -61.3600168,-21.34118 0,-11.786422 27.4718188,-21.341187 61.3600168,-21.341187 33.888203,0 61.36001,9.554765 61.36001,21.341187 l 0,0 z"
+ id="path8836"
+ style="opacity:0.5;fill:url(#radialGradient2415);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 64.519014,11.483576 c -28.701626,0 -52.017803,23.314603 -52.017803,52.014306 0,28.699691 23.316177,52.014288 52.017803,52.014288 28.701614,0 52.017826,-23.314597 52.017796,-52.014288 0,-28.699703 -23.316182,-52.014306 -52.017796,-52.014306 z"
+ id="path2555"
+ style="fill:url(#radialGradient2410);fill-opacity:1;stroke:url(#linearGradient2412);stroke-width:0.99915248;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <path
+ d="M 115.5,63.496 C 115.5,90.752953 93.199766,114.73741 64.519635,114.5 35.007083,114.25468 13.845569,90.750522 13.5,63.496 13.143881,35.409382 36.786661,12.381294 64.519635,12.5 91.775038,12.616662 115.5,34.45973 115.5,63.496 l 0,0 z"
+ id="path8655"
+ style="opacity:0.4;fill:none;stroke:url(#linearGradient2407);stroke-width:0.99915248;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <g
+ transform="matrix(2.67,0,0,2.67,-3.811972,-6.1679993)"
+ id="g3538">
+ <path
+ d="m 19.758791,24.838682 c 0.258151,0.701773 0.548718,1.270613 1.167657,0.492802 0.767347,-0.456552 3.33844,-2.457757 3.081171,-0.497532 -0.823263,3.627282 -1.825356,7.216418 -2.59157,10.854872 -0.463143,1.949963 1.060405,3.700223 2.917669,2.573693 1.97681,-1.001361 3.756466,-2.26306 5.531417,-3.506747 -0.24218,-0.593933 -0.361342,-1.310765 -1.072765,-0.745313 -0.836398,0.56783 -2.797726,2.353975 -3.154255,0.8032 0.73806,-3.927689 2.105519,-7.709984 2.979622,-11.606358 0.55087,-2.087329 0.03997,-4.139733 -2.433617,-2.911277 -2.271439,1.195114 -4.368397,3.040299 -6.425329,4.54266 z m 8.74369,-13.165303 c -2.403766,-0.127566 -3.660538,3.702509 -1.376255,4.762866 1.853222,0.760024 3.871049,-1.140692 3.418314,-3.039945 -0.140499,-0.988957 -1.028394,-1.756188 -2.042058,-1.722921 l -1e-6,0 z"
+ id="path3536"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;opacity:0.2;fill:#000000;fill-opacity:1;stroke:none;font-family:URW Palladio L;-inkscape-font-specification:URW Palladio L Bold" />
+ <path
+ d="m 19.758791,25.213243 c 0.258151,0.701773 0.548718,1.270613 1.167657,0.492802 0.767347,-0.456552 3.33844,-2.457757 3.081171,-0.497532 -0.823263,3.627282 -1.825356,7.216418 -2.59157,10.854872 -0.463143,1.949963 1.060405,3.700223 2.917669,2.573693 1.97681,-1.001361 3.756466,-2.26306 5.531417,-3.506747 -0.24218,-0.593933 -0.361342,-1.310765 -1.072765,-0.745313 -0.836398,0.56783 -2.797726,2.353975 -3.154255,0.8032 0.73806,-3.927689 2.105519,-7.709984 2.979622,-11.606358 0.55087,-2.087329 0.03997,-4.139733 -2.433617,-2.911277 -2.271439,1.195114 -4.368397,3.040299 -6.425329,4.54266 z m 8.74369,-13.165303 c -2.403766,-0.127566 -3.660538,3.702509 -1.376255,4.762866 1.853222,0.760024 3.871049,-1.140692 3.418314,-3.039945 -0.140499,-0.988957 -1.028394,-1.756188 -2.042058,-1.722921 l -1e-6,0 z"
+ id="path3714"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:URW Palladio L;-inkscape-font-specification:URW Palladio L Bold" />
+ </g>
+</svg>
diff --git a/data/app-graphics/gtk-ok.svg b/data/app-graphics/gtk-ok.svg
new file mode 100644
index 0000000..185dfc6
--- /dev/null
+++ b/data/app-graphics/gtk-ok.svg
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.1"
+ width="48"
+ height="48"
+ id="svg2448">
+ <defs
+ id="defs2450">
+ <linearGradient
+ id="linearGradient8662">
+ <stop
+ id="stop8664"
+ style="stop-color:black;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop8666"
+ style="stop-color:black;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="24.837126"
+ cy="36.421127"
+ r="15.644737"
+ fx="24.837126"
+ fy="36.421127"
+ id="radialGradient1444"
+ xlink:href="#linearGradient8662"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.536723,0,16.87306)" />
+ <linearGradient
+ id="linearGradient2264">
+ <stop
+ id="stop2266"
+ style="stop-color:#d7e866;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2268"
+ style="stop-color:#8cab2a;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="-84.343536"
+ y1="-5.3878593"
+ x2="-91.513138"
+ y2="24.558243"
+ id="linearGradient2628"
+ xlink:href="#linearGradient2264"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.017301,-0.243559,0.243559,1.017301,110.52469,-7.9553513)" />
+ <linearGradient
+ id="linearGradient3400">
+ <stop
+ id="stop3402"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3404"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="20.494444"
+ y1="6.0097799"
+ x2="20.494444"
+ y2="47.760197"
+ id="linearGradient3406"
+ xlink:href="#linearGradient3400"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <g
+ id="layer1">
+ <path
+ d="m 40.481863,36.421127 a 15.644737,8.3968938 0 1 1 -31.2894745,0 15.644737,8.3968938 0 1 1 31.2894745,0 z"
+ transform="matrix(1.214466,0,0,0.595458,-6.163846,20.31274)"
+ id="path8660"
+ style="opacity:0.20454544;color:black;fill:url(#radialGradient1444);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 33.706448,5.4818293 c -0.559734,-0.056806 -1.116221,0.217337 -1.403811,0.7436469 L 20.049307,28.645074 12.17121,22.380993 c -0.701747,-0.383453 -1.577286,-0.136769 -1.960742,0.564978 l -3.5328714,4.535744 c -0.3834475,0.701741 -0.1254891,1.577017 0.5762529,1.960469 0,0 14.3844195,11.880283 14.4021675,11.889074 0.164469,0.08987 0.336465,0.135093 0.511297,0.157184 0.571121,0.07217 1.155595,-0.196162 1.449176,-0.733433 L 40.141725,10.519399 C 40.525176,9.8176549 40.267222,8.9423801 39.565474,8.558928 L 34.26311,5.6492257 C 34.087671,5.553362 33.893026,5.5007637 33.706448,5.4818293 z"
+ id="path1542"
+ style="fill:url(#linearGradient2628);fill-opacity:1;fill-rule:nonzero;stroke:#42770c;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 32.938536,7.2012775 26.730268,18.60791 21.197213,28.668822 c -0.178482,0.181096 -0.123845,0.754094 -0.902701,0.952966 -0.538869,0.137595 -0.636352,-0.06289 -1.204172,-0.427914 l -6.950556,-5.492153 c -0.7733,-0.621665 -0.749753,-0.589365 -1.297288,-0.03737 L 8.0515824,27.18582 c -0.7518117,0.804672 -0.6353589,1.290849 0.3017539,1.891047 0,0 13.0781537,10.780055 13.0949407,10.788373 0.155564,0.085 0.0892,0.114145 0.757862,0.57814 0.428927,0.297637 0.807539,-0.647982 1.083435,-1.15286 L 39.190779,10.274963 C 39.55113,9.6155282 39.523767,9.624421 38.860008,9.2617466 L 34.11801,6.7472827 C 33.434075,6.3758505 33.430508,6.3800895 32.938536,7.2012775 z"
+ id="path1544"
+ style="opacity:0.4;fill:none;stroke:url(#linearGradient3406);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+</svg>
diff --git a/data/app-graphics/gtk-stop.svg b/data/app-graphics/gtk-stop.svg
new file mode 100644
index 0000000..6e72254
--- /dev/null
+++ b/data/app-graphics/gtk-stop.svg
@@ -0,0 +1,191 @@
+<?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:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="128"
+ height="128"
+ id="svg3767"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="process-stop.svg">
+ <defs
+ id="defs3769">
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3718"
+ id="linearGradient3724"
+ x1="64.5"
+ y1="-26.999998"
+ x2="64.5"
+ y2="24"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3718">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3720" />
+ <stop
+ style="stop-color:#f0f0f0;stop-opacity:1"
+ offset="1"
+ id="stop3722" />
+ </linearGradient>
+ <linearGradient
+ x1="63.397362"
+ y1="-12.489107"
+ x2="63.397362"
+ y2="5.4675598"
+ id="linearGradient2407"
+ xlink:href="#linearGradient4873"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(5.64345,0,0,5.6429422,-286.50588,19.30933)" />
+ <linearGradient
+ id="linearGradient4873">
+ <stop
+ id="stop4875"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4877"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="23.895569"
+ cy="3.9900031"
+ r="20.397499"
+ fx="23.895569"
+ fy="3.9900031"
+ id="radialGradient2410"
+ xlink:href="#linearGradient3242"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,6.102135,-8.0552513,0,96.659483,-202.25671)" />
+ <linearGradient
+ id="linearGradient3242">
+ <stop
+ id="stop3244"
+ style="stop-color:#f8b17e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3246"
+ style="stop-color:#e35d4f;stop-opacity:1"
+ offset="0.26238" />
+ <stop
+ id="stop3248"
+ style="stop-color:#c6262e;stop-opacity:1"
+ offset="0.66093999" />
+ <stop
+ id="stop3250"
+ style="stop-color:#690b54;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143"
+ id="linearGradient2412"
+ xlink:href="#linearGradient2490"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.5569423,0,0,2.5567709,3.1523875,-61.864612)" />
+ <linearGradient
+ id="linearGradient2490">
+ <stop
+ id="stop2492"
+ style="stop-color:#791235;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2494"
+ style="stop-color:#dd3b27;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8838">
+ <stop
+ id="stop8840"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop8842"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="10.625"
+ fy="4.625"
+ fx="62.625"
+ cy="4.625"
+ cx="62.625"
+ gradientTransform="matrix(5.7750605,0,0,2.0085789,-297.14415,30.222906)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3765"
+ xlink:href="#linearGradient8838"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.5"
+ inkscape:cx="32"
+ inkscape:cy="32"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="603"
+ inkscape:window-height="479"
+ inkscape:window-x="417"
+ inkscape:window-y="169"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata3772">
+ <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
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ transform="translate(0,64)">
+ <path
+ d="m 125.87901,39.5126 c 0,11.7864 -27.471807,21.34118 -61.36001,21.34118 -33.888198,0 -61.3600168,-9.55478 -61.3600168,-21.34118 0,-11.786422 27.4718188,-21.341187 61.3600168,-21.341187 33.888203,0 61.36001,9.554765 61.36001,21.341187 l 0,0 z"
+ id="path8836"
+ style="opacity:0.5;fill:url(#radialGradient3765);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 64.519014,-52.516424 c -28.701626,0 -52.017803,23.314603 -52.017803,52.014306 0,28.699691 23.316177,52.014288 52.017803,52.014288 28.701614,0 52.017826,-23.314597 52.017796,-52.014288 0,-28.699703 -23.316182,-52.014306 -52.017796,-52.014306 z"
+ id="path2555"
+ style="fill:url(#radialGradient2410);fill-opacity:1;stroke:url(#linearGradient2412);stroke-width:0.99915248;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <path
+ d="M 115.5,-0.504 C 115.5,26.752953 93.199766,50.73741 64.519635,50.5 35.007083,50.25468 13.845569,26.750522 13.5,-0.504 13.143881,-28.590618 36.786661,-51.618706 64.519635,-51.5 91.775038,-51.383338 115.5,-29.54027 115.5,-0.504 l 0,0 z"
+ id="path8655"
+ style="opacity:0.4;fill:none;stroke:url(#linearGradient2407);stroke-width:0.99915248;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ d="M 47.048172,-27.999998 39,-19.951826 55.604651,-3.431894 c 0.510117,0.516547 0.510117,1.347243 0,1.863787 L 39,14.951827 47.048172,23 63.568106,6.480066 c 0.516548,-0.510117 1.34724,-0.510117 1.863788,0 L 81.951828,23 90,14.951827 73.480067,-1.568107 c -0.510117,-0.516544 -0.510117,-1.34724 0,-1.863787 L 90,-19.951826 l -8.048172,-8.048172 -16.519934,16.51993 c -0.516548,0.51012 -1.34724,0.51012 -1.863788,0 l -16.519934,-16.51993 z"
+ id="path3256-4"
+ style="fill:#a9262e;fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ <path
+ d="M 47.048172,-26.999998 39,-18.951826 55.604651,-2.431894 c 0.510117,0.516547 0.510117,1.347243 0,1.863787 L 39,15.951827 47.048172,24 63.568106,7.480066 c 0.516548,-0.510117 1.34724,-0.510117 1.863788,0 L 81.951828,24 90,15.951827 73.480067,-0.568107 c -0.510117,-0.516544 -0.510117,-1.34724 0,-1.863787 L 90,-18.951826 l -8.048172,-8.048172 -16.519934,16.51993 c -0.516548,0.51012 -1.34724,0.51012 -1.863788,0 l -16.519934,-16.51993 z"
+ id="path3256"
+ style="fill:url(#linearGradient3724);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+ </g>
+</svg>
diff --git a/src/Clients/Classical/Dialogs/HigMessageDialog.cs b/src/Clients/Classical/Dialogs/HigMessageDialog.cs
index 3e48b16..a5cf5e6 100644
--- a/src/Clients/Classical/Dialogs/HigMessageDialog.cs
+++ b/src/Clients/Classical/Dialogs/HigMessageDialog.cs
@@ -15,7 +15,7 @@
* Boston, MA 02111-1307, USA.
*
*
- * Based largely on code Tomboy project source code
+ * Based largely on Tomboy project source code
*
*/
diff --git a/src/Clients/Classical/Makefile.am b/src/Clients/Classical/Makefile.am
index 3fcba71..96d3047 100644
--- a/src/Clients/Classical/Makefile.am
+++ b/src/Clients/Classical/Makefile.am
@@ -46,7 +46,9 @@ RESOURCES = \
-resource:$(top_srcdir)/data/app-graphics/memory-games-32.png \
-resource:$(top_srcdir)/data/app-graphics/verbal-games.svg \
-resource:$(top_srcdir)/data/app-graphics/verbal-games-32.png \
--resource:$(top_srcdir)/data/app-graphics/gbrainy.svg
+-resource:$(top_srcdir)/data/app-graphics/gtk-info.svg \
+-resource:$(top_srcdir)/data/app-graphics/gtk-stop.svg \
+-resource:$(top_srcdir)/data/app-graphics/gtk-ok.svg
gbrainydir = $(libdir)/gbrainy
gbrainy_SCRIPTS = ../../gbrainy.exe ../../gbrainy.exe.config
diff --git a/src/Clients/Classical/Widgets/GameDrawingArea.cs b/src/Clients/Classical/Widgets/GameDrawingArea.cs
index 2692918..ac93e76 100644
--- a/src/Clients/Classical/Widgets/GameDrawingArea.cs
+++ b/src/Clients/Classical/Widgets/GameDrawingArea.cs
@@ -31,7 +31,13 @@ namespace gbrainy.Clients.Classical.Widgets
// question or answer, etc.
public class GameDrawingArea : DrawingArea
{
- bool paused;
+ public enum SolutionType
+ {
+ None,
+ CorrectAnswer,
+ InvalidAnswer,
+ Tip,
+ };
public IDrawable Drawable { get; set; }
public string Question { get; set; }
@@ -40,8 +46,10 @@ namespace gbrainy.Clients.Classical.Widgets
public int OffsetX { get; private set; }
public int OffsetY { get; private set; }
public bool UseSolutionArea { get; set; }
+ public SolutionType SolutionIcon { get; set; }
- public bool Paused {
+ bool paused;
+ public bool Paused {
get { return paused; }
set {
paused = value;
@@ -54,10 +62,14 @@ namespace gbrainy.Clients.Classical.Widgets
const int solution_high = 55;
const int total_margin = 0; // Margin applied as in-box for themes
const double text_margin = 0.015;
+ const double icon_size = 0.08;
+ const double icon_margin = 0.01;
+
public GameDrawingArea ()
{
UseSolutionArea = true;
+ SolutionIcon = SolutionType.None;
}
protected override bool OnExposeEvent (Gdk.EventExpose args)
@@ -99,7 +111,7 @@ namespace gbrainy.Clients.Classical.Widgets
// Draw a background taking all the window area
cr.Scale (total_w, total_h);
cr.DrawBackground ();
-
+
if (Paused == false) {
DrawQuestionAndAnswer (cr, total_w, total_h);
} else {
@@ -109,8 +121,7 @@ namespace gbrainy.Clients.Classical.Widgets
}
cr.Restore ();
- if (Paused == false)
- {
+ if (Paused == false) {
// Draw the game area
cr.Translate (OffsetX, OffsetY);
cr.SetPangoNormalFontSize ();
@@ -131,8 +142,8 @@ namespace gbrainy.Clients.Classical.Widgets
double line_space;
line_space = cr.FontLineSpace;
- cr.FontLineSpace = 0.004;
- cr.SetPangoFontSize (0.018);
+ cr.FontLineSpace = 0;
+ cr.SetPangoFontSize (0.016);
scaled_margin = (double) total_margin / (double) width;
max_width = 1 - (scaled_margin * 2) - (text_margin * 2);
@@ -142,16 +153,73 @@ namespace gbrainy.Clients.Classical.Widgets
{
// Question drawing
cr.DrawStringWithWrapping (scaled_margin + text_margin, scaled_margin + text_margin, Question, max_width);
+ cr.Stroke ();
+
+ cr.LineWidth = 0.002;
+ double question_high_scaled = question_high / (double) height;
+ cr.MoveTo (0.01, question_high_scaled + 0.02);
+ cr.LineTo (0.98, question_high_scaled + 0.02);
+ cr.Stroke ();
}
+ // Solution drawing
if (UseSolutionArea && String.IsNullOrEmpty (Solution) == false)
{
- // Solution drawing
- cr.DrawStringWithWrapping (scaled_margin + text_margin, 1 - 0.12 - scaled_margin - text_margin, Solution, max_width);
+ const double box_margin = 0.005;
+ const double box_height = 0.12;
+
+ cr.Save ();
+ cr.LineWidth = 0.001;
+
+ // Draw black box
+ cr.Color = new Color (0.1, 0.1, 0.1);
+ cr.Rectangle (scaled_margin + text_margin - box_margin,
+ 1 - box_height - scaled_margin - text_margin - box_margin,
+ max_width + (box_margin * 2),
+ box_height + box_margin * box_margin);
+ cr.Fill ();
+ cr.Stroke ();
+
+ // Measure string to be able to centered vertically within the box
+ double width_str, height_str;
+ cr.MeasureString (Solution, max_width - icon_size, true, out width_str, out height_str);
+ cr.Color = new Color (1, 1, 1);
+ cr.DrawStringWithWrapping (scaled_margin + icon_size + text_margin,
+ (1 - box_height - scaled_margin - text_margin) + ((box_height - height_str) / 2),
+ Solution, max_width - icon_size);
+ cr.Stroke ();
+
+ DrawSolutionIcon (cr, 0, 1 - box_height);
+ cr.Restore ();
}
cr.UseMarkup = false;
- cr.Stroke ();
cr.FontLineSpace = line_space;
}
+
+ void DrawSolutionIcon (CairoContextEx cr, double x, double y)
+ {
+ string image;
+
+ switch (SolutionIcon) {
+ case SolutionType.CorrectAnswer:
+ image = "gtk-ok.svg";
+ break;
+ case SolutionType.InvalidAnswer:
+ image = "gtk-stop.svg";
+ break;
+ case SolutionType.Tip:
+ image = "gtk-info.svg";
+ break;
+ default:
+ image = null;
+ break;
+ }
+
+ if (image == null)
+ return;
+
+ cr.DrawImageFromAssembly (image,
+ x + icon_margin, y, icon_size, icon_size);
+ }
}
}
diff --git a/src/Clients/Classical/gbrainy.cs b/src/Clients/Classical/gbrainy.cs
index db265fb..31d7940 100755
--- a/src/Clients/Classical/gbrainy.cs
+++ b/src/Clients/Classical/gbrainy.cs
@@ -128,7 +128,7 @@ namespace gbrainy.Clients.Classical
if (toolbar != null)
{
Box box;
-
+
switch (toolbar.Orientation) {
case Gtk.Orientation.Vertical:
box = main_hbox;
@@ -141,7 +141,7 @@ namespace gbrainy.Clients.Classical
default:
throw new InvalidOperationException ();
}
-
+
bool contained = false;
foreach (var ch in box.AllChildren)
{
@@ -370,9 +370,10 @@ namespace gbrainy.Clients.Classical
drawing_area.QueueDraw ();
}
- void UpdateSolution (string solution)
+ void UpdateSolution (string solution, GameDrawingArea.SolutionType solution_type)
{
drawing_area.Solution = solution;
+ drawing_area.SolutionIcon = solution_type;
QueueDraw ();
}
@@ -477,7 +478,7 @@ namespace gbrainy.Clients.Classical
private void GetNextGame ()
{
- UpdateSolution (String.Empty);
+ UpdateSolution (String.Empty, GameDrawingArea.SolutionType.None);
UpdateQuestion (String.Empty);
session.NextGame ();
session.CurrentGame.AnswerEvent += OnAnswerFromGame;
@@ -514,19 +515,23 @@ namespace gbrainy.Clients.Classical
void OnAnswerButtonClicked (object sender, EventArgs args)
{
string answer;
+ bool correct;
if (session.CurrentGame == null)
return;
- if (session.ScoreGame (answer_entry.Text) == true)
- answer = "<span color='#00A000'>" + Catalog.GetString ("Congratulations.") + "</span>";
+ correct = session.ScoreGame (answer_entry.Text);
+ if (correct)
+ answer = Catalog.GetString ("Congratulations.");
else
answer = Catalog.GetString ("Incorrect answer.");
session.EnableTimer = false;
answer_entry.Text = String.Empty;
UpdateStatusBar ();
- UpdateSolution (answer + " " + session.CurrentGame.Answer);
+ UpdateSolution (answer + " " + session.CurrentGame.Answer,
+ correct == true ? GameDrawingArea.SolutionType.CorrectAnswer :
+ GameDrawingArea.SolutionType.InvalidAnswer);
session.CurrentGame.DrawAnswer = true;
ActiveInputControls (true);
@@ -570,7 +575,7 @@ namespace gbrainy.Clients.Classical
if (session.CurrentGame == null)
return;
- UpdateSolution (session.CurrentGame.TipString);
+ UpdateSolution (session.CurrentGame.TipString, GameDrawingArea.SolutionType.Tip);
}
void OnNewGame (GameSession.Types type)
@@ -579,7 +584,8 @@ namespace gbrainy.Clients.Classical
session.New ();
GetNextGame ();
GameSensitiveUI ();
- UpdateSolution (Catalog.GetString ("Once you have an answer type it in the \"Answer:\" entry box and press the \"OK\" button."));
+ UpdateSolution (Catalog.GetString ("Once you have an answer type it in the \"Answer:\" entry box and press the \"OK\" button."),
+ GameDrawingArea.SolutionType.Tip);
UpdateStatusBar ();
}
@@ -601,10 +607,10 @@ namespace gbrainy.Clients.Classical
void OnPdfExport (object sender, EventArgs args)
{
PdfExportDialog pdf;
-
+
pdf = new PdfExportDialog ();
pdf.Run ();
- pdf.Destroy ();
+ pdf.Destroy ();
}
void OnPreferences (object sender, EventArgs args)
@@ -652,7 +658,7 @@ namespace gbrainy.Clients.Classical
{
session.End ();
- UpdateSolution (String.Empty);
+ UpdateSolution (String.Empty, GameDrawingArea.SolutionType.None);
UpdateQuestion (String.Empty);
UpdateStatusBar ();
GameSensitiveUI ();
@@ -669,7 +675,7 @@ namespace gbrainy.Clients.Classical
pause_tbbutton.Label = Catalog.GetString ("Pause");
ActiveInputControls (true);
} else {
- drawing_area.Paused = true;
+ drawing_area.Paused = true;
pause_tbbutton.StockId = "resume";
pause_tbbutton.Label = Catalog.GetString ("Resume");
ActiveInputControls (false);
@@ -778,7 +784,7 @@ namespace gbrainy.Clients.Classical
// Register services
ServiceLocator.Instance.RegisterService <ITranslations> (new TranslationsCatalog ());
ServiceLocator.Instance.RegisterService <IConfiguration> (new MemoryConfiguration ());
-
+
// Configuration
ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.GamesDefinitions, Defines.DATA_DIR);
ServiceLocator.Instance.GetService <IConfiguration> ().Set (ConfigurationKeys.GamesGraphics, Defines.DATA_DIR);
@@ -789,7 +795,7 @@ namespace gbrainy.Clients.Classical
{
try {
Unix.SetProcessName ("gbrainy");
- }
+ }
catch (Exception e)
{
Console.WriteLine ("gbrainy.Main. Could not set process name. Error {0}", e);
@@ -798,7 +804,7 @@ namespace gbrainy.Clients.Classical
DateTime start_time = DateTime.Now;
InitCoreLibraries ();
-
+
GtkClient app = new GtkClient ();
CommandLine.Version ();
diff --git a/src/Core/Libraries/CairoContext.cs b/src/Core/Libraries/CairoContext.cs
index c9d414d..8a706e5 100644
--- a/src/Core/Libraries/CairoContext.cs
+++ b/src/Core/Libraries/CairoContext.cs
@@ -201,7 +201,7 @@ namespace gbrainy.Core.Libraries
int w, h, spacing;
Cairo.Matrix old = Matrix;
- if (max_width < 0 )
+ if (max_width < 0)
throw new ArgumentOutOfRangeException ("Invalid maximum width value");
MoveTo (x, y);
diff --git a/src/Games/Logic/PuzzleExtraCircle.cs b/src/Games/Logic/PuzzleExtraCircle.cs
index f09ed5e..44dcf5e 100644
--- a/src/Games/Logic/PuzzleExtraCircle.cs
+++ b/src/Games/Logic/PuzzleExtraCircle.cs
@@ -102,9 +102,9 @@ namespace gbrainy.Games.Logic
right_answer = GetPossibleAnswer (ans_pos);
const double text_offset = 0.04;
- const double with_used = 0.9; // Total width used for drawing all the figures
+ const double witdh_used = 0.9; // Total width used for drawing all the figures
const double margin = 0.1 / circles / 2;
- const double box_size = with_used / circles;
+ const double box_size = witdh_used / circles;
double y;
HorizontalContainer container;
DrawableArea drawable_area;
@@ -112,7 +112,7 @@ namespace gbrainy.Games.Logic
y = DrawAreaY + 0.1 + (radius / 2);
- container = new HorizontalContainer (0.05, y, with_used, box_size);
+ container = new HorizontalContainer (0.05, y, witdh_used, box_size);
AddWidget (container);
circle_parameters = new CircleParameters [circles];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]