From 49f5eef946f588f647b3be93f799d958a4de4bd4 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 25 Aug 2003 16:07:09 +0000 Subject: moved border color and width to frame theme --- src/RootTheme.cc | 9 +-------- src/RootTheme.hh | 7 ++----- src/Screen.cc | 12 ++++++------ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/RootTheme.cc b/src/RootTheme.cc index b174d25..f3695dd 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: RootTheme.cc,v 1.3 2003/08/16 10:01:57 fluxgen Exp $ +// $Id: RootTheme.cc,v 1.4 2003/08/25 16:02:24 fluxgen Exp $ #include "RootTheme.hh" @@ -29,13 +29,10 @@ RootTheme::RootTheme(int screen_num, std::string &screen_root_command): FbTk::Theme(screen_num), m_root_command(*this, "rootCommand", "RootCommand"), - m_border_width(*this, "borderWidth", "BorderWidth"), m_bevel_width(*this, "bevelWidth", "BevelWidth"), m_handle_width(*this, "handleWidth", "HandleWidth"), - m_border_color(*this, "borderColor", "BorderColor"), m_screen_root_command(screen_root_command) { - *m_border_width = 0; *m_bevel_width = 0; *m_handle_width = 0; @@ -55,10 +52,6 @@ RootTheme::~RootTheme() { } void RootTheme::reconfigTheme() { - // clamp values to "normal" size - if (*m_border_width > 20) - *m_border_width = 20; - if (*m_bevel_width > 20) *m_bevel_width = 20; diff --git a/src/RootTheme.hh b/src/RootTheme.hh index b1b9406..9d6cc4f 100644 --- a/src/RootTheme.hh +++ b/src/RootTheme.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: RootTheme.hh,v 1.2 2003/05/10 13:45:50 fluxgen Exp $ +// $Id: RootTheme.hh,v 1.3 2003/08/25 16:02:24 fluxgen Exp $ #ifndef ROOTTHEME_HH #define ROOTTHEME_HH @@ -42,16 +42,13 @@ public: void reconfigTheme(); - const FbTk::Color &borderColor() const { return *m_border_color; } - int borderWidth() const { return *m_border_width; } int bevelWidth() const { return *m_bevel_width; } int handleWidth() const { return *m_handle_width; } GC opGC() const { return m_opgc; } private: FbTk::ThemeItem m_root_command; - FbTk::ThemeItem m_border_width, m_bevel_width, m_handle_width; - FbTk::ThemeItem m_border_color; + FbTk::ThemeItem m_bevel_width, m_handle_width; std::string &m_screen_root_command; ///< string to execute and override theme rootCommand GC m_opgc; }; diff --git a/src/Screen.cc b/src/Screen.cc index eeba710..a5cb9a2 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.226 2003/08/25 13:15:53 rathnor Exp $ +// $Id: Screen.cc,v 1.227 2003/08/25 16:07:09 fluxgen Exp $ #include "Screen.hh" @@ -358,7 +358,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, XSetWindowAttributes attrib; unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder; - attrib.border_pixel = m_root_theme->borderColor().pixel(); + attrib.border_pixel = winFrameTheme().border().color().pixel(); attrib.colormap = rootWindow().colormap(); attrib.save_under = true; @@ -366,7 +366,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, m_geom_window = XCreateWindow(disp, rootWindow().window(), - 0, 0, geom_w, geom_h, rootTheme().borderWidth(), rootWindow().depth(), + 0, 0, geom_w, geom_h, winFrameTheme().border().width(), rootWindow().depth(), InputOutput, rootWindow().visual(), mask, &attrib); geom_visible = false; geom_pixmap = 0; @@ -1463,7 +1463,7 @@ void BScreen::dirFocus(FluxboxWindow &win, FocusDir dir) { FluxboxWindow *foundwin = 0; int weight = 999999, exposure = 0; // extreme values - int borderW = m_root_theme->borderWidth(), + int borderW = winFrameTheme().border().width(), top = win.y(), bottom = win.y() + win.height() + 2*borderW, left = win.x(), @@ -2165,8 +2165,8 @@ void BScreen::renderGeomWindow() { int geom_w = winFrameTheme().font().textWidth(s, l) + m_root_theme->bevelWidth()*2; m_geom_window.resize(geom_w, geom_h); - m_geom_window.setBorderWidth(m_root_theme->borderWidth()); - m_geom_window.setBorderColor(m_root_theme->borderColor()); + m_geom_window.setBorderWidth(winFrameTheme().border().width()); + m_geom_window.setBorderColor(winFrameTheme().border().color()); Pixmap tmp = geom_pixmap; -- cgit v0.11.2