From c136741213797b22a096b0e08daf2ceed9e08ab7 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 12 Sep 2003 23:37:12 +0000 Subject: added window.handleWidth and window.bevelWidth --- src/FbWinFrameTheme.cc | 19 +++++++++++++++++-- src/FbWinFrameTheme.hh | 7 +++++-- 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.cc,v 1.11 2003/08/27 17:52:08 fluxgen Exp $ +// $Id: FbWinFrameTheme.cc,v 1.12 2003/09/12 23:37:12 fluxgen Exp $ #include "FbWinFrameTheme.hh" #include "App.hh" @@ -58,9 +58,10 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num): m_font(*this, "window.font", "Window.Font"), m_textjustify(*this, "window.justify", "Window.Justify"), m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"), - m_alpha(*this, "window.alpha", "Window.Alpha"), m_title_height(*this, "window.title.height", "Window.Title.Height"), + m_bevel_width(*this, "window.bevelWidth", "Window.BevelWidth"), + m_handle_width(*this, "window.handleWidth", "Window.handleWidth"), m_border(*this, "window", "Window"), // for window.border* m_label_text_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), @@ -89,6 +90,10 @@ bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) { return FbTk::ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth"); else if (item.name() == "window.borderColor") return FbTk::ThemeManager::instance().loadItem(item, "borderColor", "BorderColor"); + else if (item.name() == "window.bevelWidth") + return FbTk::ThemeManager::instance().loadItem(item, "bevelWidth", "bevelWidth"); + else if (item.name() == "window.handleWidth") + return FbTk::ThemeManager::instance().loadItem(item, "handleWidth", "HandleWidth"); return false; } @@ -99,6 +104,16 @@ void FbWinFrameTheme::reconfigTheme() { else if (*m_alpha < 0) *m_alpha = 0; + if (*m_bevel_width > 20) + *m_bevel_width = 20; + else if (*m_bevel_width < 0) + *m_bevel_width = 0; + + if (*m_handle_width > 200) + *m_handle_width = 200; + else if (*m_handle_width < 0) + *m_handle_width = 1; + m_label_text_focus_gc.setForeground(*m_label_focus_color); m_label_text_unfocus_gc.setForeground(*m_label_unfocus_color); 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.hh,v 1.10 2003/08/27 17:52:08 fluxgen Exp $ +// $Id: FbWinFrameTheme.hh,v 1.11 2003/09/12 23:37:12 fluxgen Exp $ #ifndef FBWINFRAMETHEME_HH #define FBWINFRAMETHEME_HH @@ -96,6 +96,9 @@ public: unsigned char alpha() const { return *m_alpha; } unsigned int titleHeight() const { return *m_title_height; } + unsigned int bevelWidth() const { return *m_bevel_width; } + unsigned int handleWidth() const { return *m_handle_width; } + private: FbTk::ThemeItem m_label_focus, m_label_unfocus; FbTk::ThemeItem m_title_focus, m_title_unfocus; @@ -111,7 +114,7 @@ private: FbTk::ThemeItem m_textjustify; FbTk::ThemeItem m_shape_place; - FbTk::ThemeItem m_alpha, m_title_height; + FbTk::ThemeItem m_alpha, m_title_height, m_bevel_width, m_handle_width; BorderTheme m_border; FbTk::GContext m_label_text_focus_gc, m_label_text_unfocus_gc; -- cgit v0.11.2