all repos — fluxbox @ 3ad7d05d87b0c773437662b55adc939e8fcec8a7

custom fork of the fluxbox windowmanager

moved border color and width to frame theme
fluxgen fluxgen
commit

3ad7d05d87b0c773437662b55adc939e8fcec8a7

parent

2fadb492ed07ebf7e57de49ba83fef567d6a5df2

2 files changed, 23 insertions(+), 10 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.9 2003/08/22 15:02:33 fluxgen Exp $ +// $Id: FbWinFrameTheme.cc,v 1.10 2003/08/25 16:37:50 fluxgen Exp $ #include "FbWinFrameTheme.hh" #include "App.hh"

@@ -60,7 +60,8 @@ 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_title_height(*this, "window.title.height", "Window.Title.Height"), + m_border(*this, "window", "Window") { // for window.border* *m_title_height = 0; // set defaults

@@ -88,6 +89,15 @@ XFreeGC(disp, m_label_text_focus_gc);

XFreeGC(disp, m_label_text_unfocus_gc); XFreeGC(disp, m_button_pic_focus_gc); XFreeGC(disp, m_button_pic_unfocus_gc); +} + +bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) { + 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"); + + return false; } void FbWinFrameTheme::reconfigTheme() {
M src/FbWinFrameTheme.hhsrc/FbWinFrameTheme.hh

@@ -19,17 +19,18 @@ // 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.8 2003/08/22 15:02:33 fluxgen Exp $ +// $Id: FbWinFrameTheme.hh,v 1.9 2003/08/25 16:37:50 fluxgen Exp $ #ifndef FBWINFRAMETHEME_HH #define FBWINFRAMETHEME_HH -#include "Font.hh" -#include "Texture.hh" -#include "Text.hh" -#include "Color.hh" +#include "FbTk/Font.hh" +#include "FbTk/Texture.hh" +#include "FbTk/Text.hh" +#include "FbTk/Color.hh" #include "FbTk/Theme.hh" -#include "Subject.hh" +#include "FbTk/Subject.hh" +#include "BorderTheme.hh" #include "Shape.hh" class FbWinFrameTheme: public FbTk::Theme {

@@ -78,6 +79,7 @@ GC labelTextUnfocusGC() const { return m_label_text_unfocus_gc; }

GC buttonPicFocusGC() const { return m_button_pic_focus_gc; } GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc; } + bool fallback(FbTk::ThemeItem_base &item); void reconfigTheme(); void addListener(FbTk::Observer &obs) { m_theme_change.attach(&obs); }

@@ -88,7 +90,7 @@ inline Cursor lowerLeftAngleCursor() const { return m_cursor_lower_left_angle; }

inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; } inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } - + inline const BorderTheme &border() const { return m_border; } unsigned char alpha() const { return *m_alpha; } unsigned int titleHeight() const { return *m_title_height; }

@@ -108,7 +110,8 @@ FbTk::ThemeItem<FbTk::Justify> m_textjustify;

FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; FbTk::ThemeItem<int> m_alpha, m_title_height; - + BorderTheme m_border; + GC m_label_text_focus_gc, m_label_text_unfocus_gc; GC m_button_pic_focus_gc, m_button_pic_unfocus_gc;