diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2008-04-11 23:57:58 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-09 21:26:59 -0700 |
commit | 2f7fdae1ac1afef86e2a8a856964e7415593b206 (patch) | |
tree | 4fc198ae23e81baaf7cc312347cbb1a7ec1cb9ac /src/gui | |
parent | afe43d3736eaf33ba26d2373917d2a8de3f39667 (diff) | |
download | mana-client-2f7fdae1ac1afef86e2a8a856964e7415593b206.tar.gz mana-client-2f7fdae1ac1afef86e2a8a856964e7415593b206.tar.bz2 mana-client-2f7fdae1ac1afef86e2a8a856964e7415593b206.tar.xz mana-client-2f7fdae1ac1afef86e2a8a856964e7415593b206.zip |
Removed the rhombs around the radio buttons.
(cherry picked from commit 2fd5b9e2fea5f95f54e543011e2e8fb70f0b037f)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/radiobutton.cpp | 19 | ||||
-rw-r--r-- | src/gui/radiobutton.h | 6 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/radiobutton.cpp b/src/gui/radiobutton.cpp index 5f929e62..619ec84f 100644 --- a/src/gui/radiobutton.cpp +++ b/src/gui/radiobutton.cpp @@ -81,3 +81,22 @@ void RadioButton::drawBox(gcn::Graphics* graphics) static_cast<Graphics*>(graphics)->drawImage(box, 2, 2); } } + +void RadioButton::draw(gcn::Graphics* graphics) +{ + + graphics->pushClipArea(gcn::Rectangle(1, + 1, + getWidth() - 1, + getHeight() - 1)); + + drawBox(graphics); + + graphics->popClipArea(); + + graphics->setFont(getFont()); + graphics->setColor(getForegroundColor()); + + int h = getHeight() + getHeight() / 2; + graphics->drawText(getCaption(), h - 2, 0); +} diff --git a/src/gui/radiobutton.h b/src/gui/radiobutton.h index 8fb6d832..ef4c128c 100644 --- a/src/gui/radiobutton.h +++ b/src/gui/radiobutton.h @@ -49,6 +49,12 @@ class RadioButton : public gcn::RadioButton { */ void drawBox(gcn::Graphics* graphics); + /** + * Implementation of the draw methods. + * Thus, avoiding the rhomb around the radio button. + */ + void draw(gcn::Graphics* graphics); + private: static int instances; static Image *radioNormal; |