aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-25 16:37:50 (GMT)
committerfluxgen <fluxgen>2003-08-25 16:37:50 (GMT)
commit3ad7d05d87b0c773437662b55adc939e8fcec8a7 (patch)
tree6e074d608be4457672d7eb085abe73afb3c69e93 /src
parent2fadb492ed07ebf7e57de49ba83fef567d6a5df2 (diff)
downloadfluxbox_paul-3ad7d05d87b0c773437662b55adc939e8fcec8a7.zip
fluxbox_paul-3ad7d05d87b0c773437662b55adc939e8fcec8a7.tar.bz2
moved border color and width to frame theme
Diffstat (limited to 'src')
-rw-r--r--src/FbWinFrameTheme.cc14
-rw-r--r--src/FbWinFrameTheme.hh19
2 files changed, 23 insertions, 10 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc
index 728cd2d..37c7898 100644
--- a/src/FbWinFrameTheme.cc
+++ b/src/FbWinFrameTheme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrameTheme.cc,v 1.9 2003/08/22 15:02:33 fluxgen Exp $ 22// $Id: FbWinFrameTheme.cc,v 1.10 2003/08/25 16:37:50 fluxgen Exp $
23 23
24#include "FbWinFrameTheme.hh" 24#include "FbWinFrameTheme.hh"
25#include "App.hh" 25#include "App.hh"
@@ -60,7 +60,8 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"), 60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"),
61 61
62 m_alpha(*this, "window.alpha", "Window.Alpha"), 62 m_alpha(*this, "window.alpha", "Window.Alpha"),
63 m_title_height(*this, "window.title.height", "Window.Title.Height") { 63 m_title_height(*this, "window.title.height", "Window.Title.Height"),
64 m_border(*this, "window", "Window") { // for window.border*
64 65
65 *m_title_height = 0; 66 *m_title_height = 0;
66 // set defaults 67 // set defaults
@@ -90,6 +91,15 @@ FbWinFrameTheme::~FbWinFrameTheme() {
90 XFreeGC(disp, m_button_pic_unfocus_gc); 91 XFreeGC(disp, m_button_pic_unfocus_gc);
91} 92}
92 93
94bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) {
95 if (item.name() == "window.borderWidth")
96 return FbTk::ThemeManager::instance().loadItem(item, "borderWidth", "BorderWidth");
97 else if (item.name() == "window.borderColor")
98 return FbTk::ThemeManager::instance().loadItem(item, "borderColor", "BorderColor");
99
100 return false;
101}
102
93void FbWinFrameTheme::reconfigTheme() { 103void FbWinFrameTheme::reconfigTheme() {
94 if (*m_alpha > 255) 104 if (*m_alpha > 255)
95 *m_alpha = 255; 105 *m_alpha = 255;
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh
index 08d19a9..cecf781 100644
--- a/src/FbWinFrameTheme.hh
+++ b/src/FbWinFrameTheme.hh
@@ -19,17 +19,18 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrameTheme.hh,v 1.8 2003/08/22 15:02:33 fluxgen Exp $ 22// $Id: FbWinFrameTheme.hh,v 1.9 2003/08/25 16:37:50 fluxgen Exp $
23 23
24#ifndef FBWINFRAMETHEME_HH 24#ifndef FBWINFRAMETHEME_HH
25#define FBWINFRAMETHEME_HH 25#define FBWINFRAMETHEME_HH
26 26
27#include "Font.hh" 27#include "FbTk/Font.hh"
28#include "Texture.hh" 28#include "FbTk/Texture.hh"
29#include "Text.hh" 29#include "FbTk/Text.hh"
30#include "Color.hh" 30#include "FbTk/Color.hh"
31#include "FbTk/Theme.hh" 31#include "FbTk/Theme.hh"
32#include "Subject.hh" 32#include "FbTk/Subject.hh"
33#include "BorderTheme.hh"
33#include "Shape.hh" 34#include "Shape.hh"
34 35
35class FbWinFrameTheme: public FbTk::Theme { 36class FbWinFrameTheme: public FbTk::Theme {
@@ -78,6 +79,7 @@ public:
78 GC buttonPicFocusGC() const { return m_button_pic_focus_gc; } 79 GC buttonPicFocusGC() const { return m_button_pic_focus_gc; }
79 GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc; } 80 GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc; }
80 81
82 bool fallback(FbTk::ThemeItem_base &item);
81 void reconfigTheme(); 83 void reconfigTheme();
82 84
83 void addListener(FbTk::Observer &obs) { m_theme_change.attach(&obs); } 85 void addListener(FbTk::Observer &obs) { m_theme_change.attach(&obs); }
@@ -88,7 +90,7 @@ public:
88 inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; } 90 inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; }
89 91
90 inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } 92 inline Shape::ShapePlace shapePlace() const { return *m_shape_place; }
91 93 inline const BorderTheme &border() const { return m_border; }
92 unsigned char alpha() const { return *m_alpha; } 94 unsigned char alpha() const { return *m_alpha; }
93 95
94 unsigned int titleHeight() const { return *m_title_height; } 96 unsigned int titleHeight() const { return *m_title_height; }
@@ -108,7 +110,8 @@ private:
108 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; 110 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place;
109 111
110 FbTk::ThemeItem<int> m_alpha, m_title_height; 112 FbTk::ThemeItem<int> m_alpha, m_title_height;
111 113 BorderTheme m_border;
114
112 GC m_label_text_focus_gc, m_label_text_unfocus_gc; 115 GC m_label_text_focus_gc, m_label_text_unfocus_gc;
113 GC m_button_pic_focus_gc, m_button_pic_unfocus_gc; 116 GC m_button_pic_focus_gc, m_button_pic_unfocus_gc;
114 117