aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrameTheme.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-12 23:37:12 (GMT)
committerfluxgen <fluxgen>2003-09-12 23:37:12 (GMT)
commitc136741213797b22a096b0e08daf2ceed9e08ab7 (patch)
tree664f7d2954811ccb5020548799b97a770ab400c4 /src/FbWinFrameTheme.cc
parent4c1c1267b62d2f63f90e1691a8cdd6ee2446995c (diff)
downloadfluxbox-c136741213797b22a096b0e08daf2ceed9e08ab7.zip
fluxbox-c136741213797b22a096b0e08daf2ceed9e08ab7.tar.bz2
added window.handleWidth and window.bevelWidth
Diffstat (limited to 'src/FbWinFrameTheme.cc')
-rw-r--r--src/FbWinFrameTheme.cc19
1 files changed, 17 insertions, 2 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);