all repos — fluxbox @ c136741213797b22a096b0e08daf2ceed9e08ab7

custom fork of the fluxbox windowmanager

added window.handleWidth and window.bevelWidth
fluxgen fluxgen
commit

c136741213797b22a096b0e08daf2ceed9e08ab7

parent

4c1c1267b62d2f63f90e1691a8cdd6ee2446995c

2 files changed, 22 insertions(+), 4 deletions(-)

jump to
M src/FbWinFrameTheme.ccsrc/FbWinFrameTheme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@

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 @@ if (item.name() == "window.borderWidth")

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; }

@@ -98,6 +103,16 @@ if (*m_alpha > 255)

*m_alpha = 255; 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 src/FbWinFrameTheme.hhsrc/FbWinFrameTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ inline const BorderTheme &border() const { return m_border; }

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<FbTk::Texture> m_label_focus, m_label_unfocus; FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus;

@@ -111,7 +114,7 @@ FbTk::ThemeItem<FbTk::Font> m_font;

FbTk::ThemeItem<FbTk::Justify> m_textjustify; FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; - FbTk::ThemeItem<int> m_alpha, m_title_height; + FbTk::ThemeItem<int> 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;