]> Dogcows Code - chaz/openbox/blobdiff - otk/button.cc
put a header where it belongs
[chaz/openbox] / otk / button.cc
index 502a226f2d8033362d682ce5d8d9957c8795468a..fd23a5698d74d54ff15851df3c25255834459025 100644 (file)
@@ -12,17 +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()
-{
-  if (_pressed_focus_tx) delete _pressed_focus_tx;
-  if (_pressed_unfocus_tx) delete _pressed_unfocus_tx;
-}
 
 void OtkButton::press(unsigned int mouse_button)
 {
This page took 0.024443 seconds and 4 git commands to generate.