aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbWinFrameTheme.cc19
-rw-r--r--src/FbWinFrameTheme.hh7
2 files changed, 22 insertions, 4 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc
index 7f6720b..5ac0d3d 100644
--- a/src/FbWinFrameTheme.cc
+++ b/src/FbWinFrameTheme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrameTheme.cc,v 1.11 2003/08/27 17:52:08 fluxgen Exp $ 22// $Id: FbWinFrameTheme.cc,v 1.12 2003/09/12 23:37:12 fluxgen Exp $
23 23
24#include "FbWinFrameTheme.hh" 24#include "FbWinFrameTheme.hh"
25#include "App.hh" 25#include "App.hh"
@@ -58,9 +58,10 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
58 m_font(*this, "window.font", "Window.Font"), 58 m_font(*this, "window.font", "Window.Font"),
59 m_textjustify(*this, "window.justify", "Window.Justify"), 59 m_textjustify(*this, "window.justify", "Window.Justify"),
60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"), 60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"),
61
62 m_alpha(*this, "window.alpha", "Window.Alpha"), 61 m_alpha(*this, "window.alpha", "Window.Alpha"),
63 m_title_height(*this, "window.title.height", "Window.Title.Height"), 62 m_title_height(*this, "window.title.height", "Window.Title.Height"),
63 m_bevel_width(*this, "window.bevelWidth", "Window.BevelWidth"),
64 m_handle_width(*this, "window.handleWidth", "Window.handleWidth"),
64 m_border(*this, "window", "Window"), // for window.border* 65 m_border(*this, "window", "Window"), // for window.border*
65 m_label_text_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), 66 m_label_text_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
66 m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), 67 m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)),
@@ -89,6 +90,10 @@ bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) {
89 return FbTk::ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth"); 90 return FbTk::ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth");
90 else if (item.name() == "window.borderColor") 91 else if (item.name() == "window.borderColor")
91 return FbTk::ThemeManager::instance().loadItem(item, "borderColor", "BorderColor"); 92 return FbTk::ThemeManager::instance().loadItem(item, "borderColor", "BorderColor");
93 else if (item.name() == "window.bevelWidth")
94 return FbTk::ThemeManager::instance().loadItem(item, "bevelWidth", "bevelWidth");
95 else if (item.name() == "window.handleWidth")
96 return FbTk::ThemeManager::instance().loadItem(item, "handleWidth", "HandleWidth");
92 97
93 return false; 98 return false;
94} 99}
@@ -99,6 +104,16 @@ void FbWinFrameTheme::reconfigTheme() {
99 else if (*m_alpha < 0) 104 else if (*m_alpha < 0)
100 *m_alpha = 0; 105 *m_alpha = 0;
101 106
107 if (*m_bevel_width > 20)
108 *m_bevel_width = 20;
109 else if (*m_bevel_width < 0)
110 *m_bevel_width = 0;
111
112 if (*m_handle_width > 200)
113 *m_handle_width = 200;
114 else if (*m_handle_width < 0)
115 *m_handle_width = 1;
116
102 m_label_text_focus_gc.setForeground(*m_label_focus_color); 117 m_label_text_focus_gc.setForeground(*m_label_focus_color);
103 m_label_text_unfocus_gc.setForeground(*m_label_unfocus_color); 118 m_label_text_unfocus_gc.setForeground(*m_label_unfocus_color);
104 m_button_pic_focus_gc.setForeground(*m_button_focus_color); 119 m_button_pic_focus_gc.setForeground(*m_button_focus_color);
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh
index ef61f1a..6b4edd4 100644
--- a/src/FbWinFrameTheme.hh
+++ b/src/FbWinFrameTheme.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrameTheme.hh,v 1.10 2003/08/27 17:52:08 fluxgen Exp $ 22// $Id: FbWinFrameTheme.hh,v 1.11 2003/09/12 23:37:12 fluxgen Exp $
23 23
24#ifndef FBWINFRAMETHEME_HH 24#ifndef FBWINFRAMETHEME_HH
25#define FBWINFRAMETHEME_HH 25#define FBWINFRAMETHEME_HH
@@ -96,6 +96,9 @@ public:
96 unsigned char alpha() const { return *m_alpha; } 96 unsigned char alpha() const { return *m_alpha; }
97 97
98 unsigned int titleHeight() const { return *m_title_height; } 98 unsigned int titleHeight() const { return *m_title_height; }
99 unsigned int bevelWidth() const { return *m_bevel_width; }
100 unsigned int handleWidth() const { return *m_handle_width; }
101
99private: 102private:
100 FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus; 103 FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus;
101 FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus; 104 FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus;
@@ -111,7 +114,7 @@ private:
111 FbTk::ThemeItem<FbTk::Justify> m_textjustify; 114 FbTk::ThemeItem<FbTk::Justify> m_textjustify;
112 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; 115 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place;
113 116
114 FbTk::ThemeItem<int> m_alpha, m_title_height; 117 FbTk::ThemeItem<int> m_alpha, m_title_height, m_bevel_width, m_handle_width;
115 BorderTheme m_border; 118 BorderTheme m_border;
116 119
117 FbTk::GContext m_label_text_focus_gc, m_label_text_unfocus_gc; 120 FbTk::GContext m_label_text_focus_gc, m_label_text_unfocus_gc;