all repos — fluxbox @ 49f5eef946f588f647b3be93f799d958a4de4bd4

custom fork of the fluxbox windowmanager

moved border color and width to frame theme
fluxgen fluxgen
commit

49f5eef946f588f647b3be93f799d958a4de4bd4

parent

06a66cc30446945e9d2a440de2b9a9e9f6561ead

3 files changed, 9 insertions(+), 19 deletions(-)

jump to
M src/RootTheme.ccsrc/RootTheme.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: 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 @@ XFreeGC(FbTk::App::instance()->display(), m_opgc);

} 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;
M src/RootTheme.hhsrc/RootTheme.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: 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 @@ ~RootTheme();

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<std::string> m_root_command; - FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_handle_width; - FbTk::ThemeItem<FbTk::Color> m_border_color; + FbTk::ThemeItem<int> m_bevel_width, m_handle_width; std::string &m_screen_root_command; ///< string to execute and override theme rootCommand GC m_opgc; };
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,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: 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 @@ int geom_w = 100; // just initial, will be fixed in render

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 @@ winFrameTheme().reconfigSig().attach(this);// for geom window

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 @@ // in the given direction

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 @@ int geom_h = winFrameTheme().font().height() + m_root_theme->bevelWidth()*2;

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;