summaryrefslogtreecommitdiff
path: root/otk/button.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-08 08:13:02 +0000
committerDana Jansens <danakj@orodu.net>2003-02-08 08:13:02 +0000
commitf51f1c775f3f09cf184ead323d111985c888d52e (patch)
tree22bfcdb158b450c2f7e971b206f37e5c873d79e3 /otk/button.cc
parente72d9d90f9f29809dead53968395c2c8ae5470f0 (diff)
stacked cycling menu works now. add a highlighted flag to otk widgets
Diffstat (limited to 'otk/button.cc')
-rw-r--r--otk/button.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/otk/button.cc b/otk/button.cc
index 8d63ed0c..1e128784 100644
--- a/otk/button.cc
+++ b/otk/button.cc
@@ -9,8 +9,10 @@
namespace otk {
Button::Button(Widget *parent)
- : Label(parent), _default(false), _pressed(false)
+ : Label(parent),
+ _pressed(false)
{
+ setHighlighted(false);
setHorizontalJustify(RenderStyle::CenterJustify);
setVerticalJustify(RenderStyle::CenterJustify);
styleChanged(*RenderStyle::style(screen()));
@@ -53,16 +55,9 @@ void Button::buttonReleaseHandler(const XButtonEvent &e)
release(e.button);
}
-void Button::setDefault(bool d)
-{
- _default = d;
- styleChanged(*RenderStyle::style(screen()));
- refresh();
-}
-
void Button::styleChanged(const RenderStyle &style)
{
- if (_default) {
+ if (isHighlighted()) {
if (_pressed)
_texture = style.buttonPressFocusBackground();
else