aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-25 16:07:09 (GMT)
committerfluxgen <fluxgen>2003-08-25 16:07:09 (GMT)
commit49f5eef946f588f647b3be93f799d958a4de4bd4 (patch)
tree04917853374a906b2eeb55ab360af92ebf57d618
parent06a66cc30446945e9d2a440de2b9a9e9f6561ead (diff)
downloadfluxbox_pavel-49f5eef946f588f647b3be93f799d958a4de4bd4.zip
fluxbox_pavel-49f5eef946f588f647b3be93f799d958a4de4bd4.tar.bz2
moved border color and width to frame theme
-rw-r--r--src/RootTheme.cc9
-rw-r--r--src/RootTheme.hh7
-rw-r--r--src/Screen.cc12
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 @@
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: RootTheme.cc,v 1.3 2003/08/16 10:01:57 fluxgen Exp $ 22// $Id: RootTheme.cc,v 1.4 2003/08/25 16:02:24 fluxgen Exp $
23 23
24#include "RootTheme.hh" 24#include "RootTheme.hh"
25 25
@@ -29,13 +29,10 @@
29RootTheme::RootTheme(int screen_num, std::string &screen_root_command): 29RootTheme::RootTheme(int screen_num, std::string &screen_root_command):
30 FbTk::Theme(screen_num), 30 FbTk::Theme(screen_num),
31 m_root_command(*this, "rootCommand", "RootCommand"), 31 m_root_command(*this, "rootCommand", "RootCommand"),
32 m_border_width(*this, "borderWidth", "BorderWidth"),
33 m_bevel_width(*this, "bevelWidth", "BevelWidth"), 32 m_bevel_width(*this, "bevelWidth", "BevelWidth"),
34 m_handle_width(*this, "handleWidth", "HandleWidth"), 33 m_handle_width(*this, "handleWidth", "HandleWidth"),
35 m_border_color(*this, "borderColor", "BorderColor"),
36 m_screen_root_command(screen_root_command) { 34 m_screen_root_command(screen_root_command) {
37 35
38 *m_border_width = 0;
39 *m_bevel_width = 0; 36 *m_bevel_width = 0;
40 *m_handle_width = 0; 37 *m_handle_width = 0;
41 38
@@ -55,10 +52,6 @@ RootTheme::~RootTheme() {
55} 52}
56 53
57void RootTheme::reconfigTheme() { 54void RootTheme::reconfigTheme() {
58 // clamp values to "normal" size
59 if (*m_border_width > 20)
60 *m_border_width = 20;
61
62 if (*m_bevel_width > 20) 55 if (*m_bevel_width > 20)
63 *m_bevel_width = 20; 56 *m_bevel_width = 20;
64 57
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 @@
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: RootTheme.hh,v 1.2 2003/05/10 13:45:50 fluxgen Exp $ 22// $Id: RootTheme.hh,v 1.3 2003/08/25 16:02:24 fluxgen Exp $
23 23
24#ifndef ROOTTHEME_HH 24#ifndef ROOTTHEME_HH
25#define ROOTTHEME_HH 25#define ROOTTHEME_HH
@@ -42,16 +42,13 @@ public:
42 42
43 void reconfigTheme(); 43 void reconfigTheme();
44 44
45 const FbTk::Color &borderColor() const { return *m_border_color; }
46 int borderWidth() const { return *m_border_width; }
47 int bevelWidth() const { return *m_bevel_width; } 45 int bevelWidth() const { return *m_bevel_width; }
48 int handleWidth() const { return *m_handle_width; } 46 int handleWidth() const { return *m_handle_width; }
49 GC opGC() const { return m_opgc; } 47 GC opGC() const { return m_opgc; }
50 48
51private: 49private:
52 FbTk::ThemeItem<std::string> m_root_command; 50 FbTk::ThemeItem<std::string> m_root_command;
53 FbTk::ThemeItem<int> m_border_width, m_bevel_width, m_handle_width; 51 FbTk::ThemeItem<int> m_bevel_width, m_handle_width;
54 FbTk::ThemeItem<FbTk::Color> m_border_color;
55 std::string &m_screen_root_command; ///< string to execute and override theme rootCommand 52 std::string &m_screen_root_command; ///< string to execute and override theme rootCommand
56 GC m_opgc; 53 GC m_opgc;
57}; 54};
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 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.226 2003/08/25 13:15:53 rathnor Exp $ 25// $Id: Screen.cc,v 1.227 2003/08/25 16:07:09 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -358,7 +358,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
358 358
359 XSetWindowAttributes attrib; 359 XSetWindowAttributes attrib;
360 unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder; 360 unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder;
361 attrib.border_pixel = m_root_theme->borderColor().pixel(); 361 attrib.border_pixel = winFrameTheme().border().color().pixel();
362 attrib.colormap = rootWindow().colormap(); 362 attrib.colormap = rootWindow().colormap();
363 attrib.save_under = true; 363 attrib.save_under = true;
364 364
@@ -366,7 +366,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
366 366
367 m_geom_window = 367 m_geom_window =
368 XCreateWindow(disp, rootWindow().window(), 368 XCreateWindow(disp, rootWindow().window(),
369 0, 0, geom_w, geom_h, rootTheme().borderWidth(), rootWindow().depth(), 369 0, 0, geom_w, geom_h, winFrameTheme().border().width(), rootWindow().depth(),
370 InputOutput, rootWindow().visual(), mask, &attrib); 370 InputOutput, rootWindow().visual(), mask, &attrib);
371 geom_visible = false; 371 geom_visible = false;
372 geom_pixmap = 0; 372 geom_pixmap = 0;
@@ -1463,7 +1463,7 @@ void BScreen::dirFocus(FluxboxWindow &win, FocusDir dir) {
1463 1463
1464 FluxboxWindow *foundwin = 0; 1464 FluxboxWindow *foundwin = 0;
1465 int weight = 999999, exposure = 0; // extreme values 1465 int weight = 999999, exposure = 0; // extreme values
1466 int borderW = m_root_theme->borderWidth(), 1466 int borderW = winFrameTheme().border().width(),
1467 top = win.y(), 1467 top = win.y(),
1468 bottom = win.y() + win.height() + 2*borderW, 1468 bottom = win.y() + win.height() + 2*borderW,
1469 left = win.x(), 1469 left = win.x(),
@@ -2165,8 +2165,8 @@ void BScreen::renderGeomWindow() {
2165 int geom_w = winFrameTheme().font().textWidth(s, l) + m_root_theme->bevelWidth()*2; 2165 int geom_w = winFrameTheme().font().textWidth(s, l) + m_root_theme->bevelWidth()*2;
2166 m_geom_window.resize(geom_w, geom_h); 2166 m_geom_window.resize(geom_w, geom_h);
2167 2167
2168 m_geom_window.setBorderWidth(m_root_theme->borderWidth()); 2168 m_geom_window.setBorderWidth(winFrameTheme().border().width());
2169 m_geom_window.setBorderColor(m_root_theme->borderColor()); 2169 m_geom_window.setBorderColor(winFrameTheme().border().color());
2170 2170
2171 2171
2172 Pixmap tmp = geom_pixmap; 2172 Pixmap tmp = geom_pixmap;