summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-04 12:49:20 (GMT)
committerfluxgen <fluxgen>2003-08-04 12:49:20 (GMT)
commit261ae69cd1fefeb053390853c5cfc83a5a576298 (patch)
tree2ac4693e2cdf3a8e0fec31cbacb91fb189a9266e
parent10c972f7f790fa3d48d9f41abe4cce2933e8f5e3 (diff)
downloadfluxbox_lack-261ae69cd1fefeb053390853c5cfc83a5a576298.zip
fluxbox_lack-261ae69cd1fefeb053390853c5cfc83a5a576298.tar.bz2
added alpha option for transparent
-rw-r--r--src/FbWinFrameTheme.cc10
-rw-r--r--src/FbWinFrameTheme.hh8
2 files changed, 15 insertions, 3 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc
index 7d439f3..0031568 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.6 2003/07/10 14:17:18 fluxgen Exp $ 22// $Id: FbWinFrameTheme.cc,v 1.7 2003/08/04 12:49:20 fluxgen Exp $
23 23
24#include "FbWinFrameTheme.hh" 24#include "FbWinFrameTheme.hh"
25#include "App.hh" 25#include "App.hh"
@@ -57,7 +57,9 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
57 57
58 m_font(*this, "window.font", "Window.Font"), 58 m_font(*this, "window.font", "Window.Font"),
59 m_textjustify(*this, "window.justify", "Window.Justify"), 59 m_textjustify(*this, "window.justify", "Window.Justify"),
60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners") { 60 m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"),
61
62 m_alpha(*this, "window.alpha", "Window.Alpha") {
61 63
62 // create GCs 64 // create GCs
63 Display *disp = FbTk::App::instance()->display(); 65 Display *disp = FbTk::App::instance()->display();
@@ -83,6 +85,10 @@ FbWinFrameTheme::~FbWinFrameTheme() {
83} 85}
84 86
85void FbWinFrameTheme::reconfigTheme() { 87void FbWinFrameTheme::reconfigTheme() {
88 if (*m_alpha > 255)
89 *m_alpha = 255;
90 else if (*m_alpha < 0)
91 *m_alpha = 0;
86 92
87 XGCValues gcv; 93 XGCValues gcv;
88 unsigned long gc_value_mask = GCForeground; 94 unsigned long gc_value_mask = GCForeground;
diff --git a/src/FbWinFrameTheme.hh b/src/FbWinFrameTheme.hh
index 6acf395..903dfd7 100644
--- a/src/FbWinFrameTheme.hh
+++ b/src/FbWinFrameTheme.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: FbWinFrameTheme.hh,v 1.6 2003/07/10 11:38:12 fluxgen Exp $ 22// $Id: FbWinFrameTheme.hh,v 1.7 2003/08/04 12:49:20 fluxgen Exp $
23 23
24#ifndef FBWINFRAMETHEME_HH 24#ifndef FBWINFRAMETHEME_HH
25#define FBWINFRAMETHEME_HH 25#define FBWINFRAMETHEME_HH
@@ -88,6 +88,9 @@ public:
88 inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; } 88 inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; }
89 89
90 inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } 90 inline Shape::ShapePlace shapePlace() const { return *m_shape_place; }
91
92 unsigned char alpha() const { return *m_alpha; }
93
91private: 94private:
92 FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus; 95 FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus;
93 FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus; 96 FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus;
@@ -103,8 +106,11 @@ private:
103 FbTk::ThemeItem<FbTk::Justify> m_textjustify; 106 FbTk::ThemeItem<FbTk::Justify> m_textjustify;
104 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; 107 FbTk::ThemeItem<Shape::ShapePlace> m_shape_place;
105 108
109 FbTk::ThemeItem<int> m_alpha;
110
106 GC m_label_text_focus_gc, m_label_text_unfocus_gc; 111 GC m_label_text_focus_gc, m_label_text_unfocus_gc;
107 GC m_button_pic_focus_gc, m_button_pic_unfocus_gc; 112 GC m_button_pic_focus_gc, m_button_pic_unfocus_gc;
113
108 FbTk::Subject m_theme_change; 114 FbTk::Subject m_theme_change;
109 115
110 Cursor m_cursor_move, m_cursor_lower_left_angle, m_cursor_lower_right_angle; 116 Cursor m_cursor_move, m_cursor_lower_left_angle, m_cursor_lower_right_angle;