From 261ae69cd1fefeb053390853c5cfc83a5a576298 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 4 Aug 2003 12:49:20 +0000 Subject: added alpha option for transparent --- src/FbWinFrameTheme.cc | 10 ++++++++-- src/FbWinFrameTheme.hh | 8 +++++++- 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.cc,v 1.6 2003/07/10 14:17:18 fluxgen Exp $ +// $Id: FbWinFrameTheme.cc,v 1.7 2003/08/04 12:49:20 fluxgen Exp $ #include "FbWinFrameTheme.hh" #include "App.hh" @@ -57,7 +57,9 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num): m_font(*this, "window.font", "Window.Font"), m_textjustify(*this, "window.justify", "Window.Justify"), - m_shape_place(*this, "window.roundCorners", "Window.RoundCorners") { + m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"), + + m_alpha(*this, "window.alpha", "Window.Alpha") { // create GCs Display *disp = FbTk::App::instance()->display(); @@ -83,6 +85,10 @@ FbWinFrameTheme::~FbWinFrameTheme() { } void FbWinFrameTheme::reconfigTheme() { + if (*m_alpha > 255) + *m_alpha = 255; + else if (*m_alpha < 0) + *m_alpha = 0; XGCValues gcv; 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.hh,v 1.6 2003/07/10 11:38:12 fluxgen Exp $ +// $Id: FbWinFrameTheme.hh,v 1.7 2003/08/04 12:49:20 fluxgen Exp $ #ifndef FBWINFRAMETHEME_HH #define FBWINFRAMETHEME_HH @@ -88,6 +88,9 @@ public: inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; } inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } + + unsigned char alpha() const { return *m_alpha; } + private: FbTk::ThemeItem m_label_focus, m_label_unfocus; FbTk::ThemeItem m_title_focus, m_title_unfocus; @@ -103,8 +106,11 @@ private: FbTk::ThemeItem m_textjustify; FbTk::ThemeItem m_shape_place; + FbTk::ThemeItem m_alpha; + GC m_label_text_focus_gc, m_label_text_unfocus_gc; GC m_button_pic_focus_gc, m_button_pic_unfocus_gc; + FbTk::Subject m_theme_change; Cursor m_cursor_move, m_cursor_lower_left_angle, m_cursor_lower_right_angle; -- cgit v0.11.2