]> Dogcows Code - chaz/openbox/commitdiff
update the textures being used on setStyle() calls
authorDana Jansens <danakj@orodu.net>
Tue, 3 Dec 2002 19:01:41 +0000 (19:01 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 3 Dec 2002 19:01:41 +0000 (19:01 +0000)
otk/button.cc
otk/button.hh

index 8dea882e461c41b07405be9f6d4f868a27242882..fd23a5698d74d54ff15851df3c25255834459025 100644 (file)
@@ -12,15 +12,24 @@ OtkButton::OtkButton(OtkWidget *parent)
   : OtkFocusLabel(parent), _pressed(false), _pressed_focus_tx(0),
     _pressed_unfocus_tx(0), _unpr_focus_tx(0), _unpr_unfocus_tx(0)
 {
+  setStyle(getStyle());
+}
+
+OtkButton::~OtkButton()
+{
+}
+
+
+void OtkButton::setStyle(Style *style)
+{
+  OtkFocusLabel::setStyle(style);
+  
   setTexture(getStyle()->getButtonFocus());
   setUnfocusTexture(getStyle()->getButtonUnfocus());
   _pressed_focus_tx = getStyle()->getButtonPressedFocus();
   _pressed_unfocus_tx = getStyle()->getButtonPressedUnfocus();
 }
 
-OtkButton::~OtkButton()
-{
-}
 
 void OtkButton::press(unsigned int mouse_button)
 {
index a5f9369001d9f24e635059952a41fa57d6a8e5a4..2d983fb3c233c8a34a0aea1d0e5be5e8efb8e852 100644 (file)
@@ -32,6 +32,8 @@ public:
   void buttonPressHandler(const XButtonEvent &e);
   void buttonReleaseHandler(const XButtonEvent &e);
 
+  void setStyle(Style *style);
+  
 private:
 
   bool _pressed;
This page took 0.023416 seconds and 4 git commands to generate.