From 62adec2f25d8c5c4926d6294bd63ddc8e13cb853 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Wed, 13 Aug 2003 15:12:39 +0000
Subject: cleaning

---
 src/ToolbarTheme.cc | 34 +++++-----------------------------
 src/ToolbarTheme.hh | 43 ++++++++-----------------------------------
 2 files changed, 13 insertions(+), 64 deletions(-)

diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc
index 0608726..6067264 100644
--- a/src/ToolbarTheme.cc
+++ b/src/ToolbarTheme.cc
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: ToolbarTheme.cc,v 1.7 2003/08/13 09:53:46 fluxgen Exp $
+// $Id: ToolbarTheme.cc,v 1.8 2003/08/13 15:12:39 fluxgen Exp $
 
 #include "ToolbarTheme.hh"
 
@@ -45,36 +45,20 @@ void FbTk::ThemeItem<bool>::setFromString(char const *strval) {
 
 ToolbarTheme::ToolbarTheme(int screen_num):
     FbTk::Theme(screen_num),
-    m_button_color(*this, 
-                   "toolbar.button.picColor", "Toolbar.Button.PicColor"),
-    m_border_color(*this,
-                   "toolbar.borderColor", "Toolbar.BorderColor"),
     m_toolbar(*this, "toolbar", "Toolbar"),
-    m_button(*this, "toolbar.button", "Toolbar.Button"),
-    m_pressed_button(*this, 
-                     "toolbar.button.pressed", "Toolbar.Button.Pressed"),
-    m_border_width(*this, "toolbar.borderWidth", "Toolbar.BorderWidth"),
+    m_border(*this, "toolbar", "Toolbar"),
     m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
-    m_button_border_width(*this, "toolbar.button.borderWidth", "Toolbar.Button.BorderWidth"),
     m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"),    
     m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"),
     m_display(FbTk::App::instance()->display()) {
 
-    Window rootwindow = RootWindow(m_display, screen_num);
-
-    XGCValues gcv;
-    unsigned long gc_value_mask = GCForeground;
-    
-
-    gcv.foreground = m_button_color->pixel();
-    m_button_pic_gc =
-        XCreateGC(m_display, rootwindow,
-                  gc_value_mask, &gcv);
+    *m_bevel_width = 0;
+    *m_alpha = 255;
 
 }
 
 ToolbarTheme::~ToolbarTheme() {
-    XFreeGC(m_display, m_button_pic_gc);
+
 }
 
 void ToolbarTheme::reconfigTheme() {
@@ -82,12 +66,4 @@ void ToolbarTheme::reconfigTheme() {
         *m_alpha = 255;
     else if (*m_alpha < 0)
         *m_alpha = 0;
-
-    XGCValues gcv;
-    unsigned long gc_value_mask = GCForeground;
-
-    gcv.foreground = m_button_color->pixel();
-    XChangeGC(m_display, m_button_pic_gc,
-              gc_value_mask, &gcv);
-
 }
diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh
index 4076732..b29ab59 100644
--- a/src/ToolbarTheme.hh
+++ b/src/ToolbarTheme.hh
@@ -19,17 +19,16 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: ToolbarTheme.hh,v 1.7 2003/08/13 09:53:35 fluxgen Exp $
+// $Id: ToolbarTheme.hh,v 1.8 2003/08/13 15:12:39 fluxgen Exp $
 
 #ifndef TOOLBARTHEME_HH
 #define TOOLBARTHEME_HH
 
 #include "FbTk/Theme.hh"
-#include "Font.hh"
 #include "Texture.hh"
 #include "Color.hh"
-#include "Text.hh"
-#include "Subject.hh"
+
+#include "BorderTheme.hh"
 
 /// toolbar theme class container
 class ToolbarTheme: public FbTk::Theme {
@@ -39,48 +38,22 @@ public:
 
     void reconfigTheme();
     
-    /**
-       @name colors
-    */
-    ///@{
-    const FbTk::Color &buttonColor() const { return *m_button_color; }
-    const FbTk::Color &borderColor() const { return *m_border_color; }
-    ///@}
-    /**
-       @name textures
-    */
-    ///@{
-    const FbTk::Texture &toolbar() const { return *m_toolbar; }
-    const FbTk::Texture &button() const { return *m_button; }
-    const FbTk::Texture &pressedButton() const { return *m_pressed_button; }
-    ///@}
 
-    /**
-       @name graphic context
-     */
-    ///@{
-    GC buttonPicGC() const { return m_button_pic_gc; }
-    ///@}
+    inline const BorderTheme &border() const { return m_border; }
+    inline const FbTk::Texture &toolbar() const { return *m_toolbar; }
 
-    inline int borderWidth() const { return *m_border_width; }
     inline int bevelWidth() const { return *m_bevel_width; }    
-    inline int buttonBorderWidth() const { return *m_button_border_width; }
     inline bool shape() const { return *m_shape; }
     inline unsigned char alpha() const { return *m_alpha; }
 
 private:
-    // text colors
-    FbTk::ThemeItem<FbTk::Color> m_button_color, m_border_color;
-    // textures
-    FbTk::ThemeItem<FbTk::Texture> m_toolbar,  m_button, m_pressed_button;
+    FbTk::ThemeItem<FbTk::Texture> m_toolbar;
+    BorderTheme m_border;
 
-    FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_button_border_width;
+    FbTk::ThemeItem<int> m_bevel_width;
     FbTk::ThemeItem<bool> m_shape;
     FbTk::ThemeItem<int> m_alpha;
 
-    // graphic context
-    GC m_button_pic_gc;
-
     Display *m_display;
 
 };
-- 
cgit v0.11.2