diff options
author | rathnor <rathnor> | 2004-09-12 14:56:20 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-09-12 14:56:20 (GMT) |
commit | 42c1fd3ae3dd058e146b7350c65b74386123c25c (patch) | |
tree | cc549c2c7b12c87f8c33198f5b30f00d9dd30bc6 /src/FbWinFrameTheme.cc | |
parent | c39234195a46cece2bdb18dfdde6c91c7a190dc4 (diff) | |
download | fluxbox-42c1fd3ae3dd058e146b7350c65b74386123c25c.zip fluxbox-42c1fd3ae3dd058e146b7350c65b74386123c25c.tar.bz2 |
preliminary support for composite/compositing manager. Also general work
for consistency with transparency resources
Diffstat (limited to 'src/FbWinFrameTheme.cc')
-rw-r--r-- | src/FbWinFrameTheme.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc index e2e89fc..0161155 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.18 2004/05/24 15:30:52 rathnor Exp $ | 22 | // $Id: FbWinFrameTheme.cc,v 1.19 2004/09/12 14:56:18 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbWinFrameTheme.hh" | 24 | #include "FbWinFrameTheme.hh" |
25 | #include "App.hh" | 25 | #include "App.hh" |
@@ -58,7 +58,6 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num): | |||
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 | m_alpha(*this, "window.alpha", "Window.Alpha"), | ||
62 | m_title_height(*this, "window.title.height", "Window.Title.Height"), | 61 | m_title_height(*this, "window.title.height", "Window.Title.Height"), |
63 | m_bevel_width(*this, "window.bevelWidth", "Window.BevelWidth"), | 62 | m_bevel_width(*this, "window.bevelWidth", "Window.BevelWidth"), |
64 | m_handle_width(*this, "window.handleWidth", "Window.handleWidth"), | 63 | m_handle_width(*this, "window.handleWidth", "Window.handleWidth"), |
@@ -67,12 +66,13 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num): | |||
67 | m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), | 66 | m_label_text_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), |
68 | m_label_text_active_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), | 67 | m_label_text_active_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), |
69 | m_button_pic_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), | 68 | m_button_pic_focus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), |
70 | m_button_pic_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)) { | 69 | m_button_pic_unfocus_gc(RootWindow(FbTk::App::instance()->display(), screen_num)), |
70 | m_focused_alpha(255), | ||
71 | m_unfocused_alpha(255) { | ||
71 | 72 | ||
72 | *m_title_height = 0; | 73 | *m_title_height = 0; |
73 | // set defaults | 74 | // set defaults |
74 | m_font->load("fixed"); | 75 | m_font->load("fixed"); |
75 | *m_alpha = 255; | ||
76 | 76 | ||
77 | // create cursors | 77 | // create cursors |
78 | Display *disp = FbTk::App::instance()->display(); | 78 | Display *disp = FbTk::App::instance()->display(); |
@@ -105,20 +105,12 @@ bool FbWinFrameTheme::fallback(FbTk::ThemeItem_base &item) { | |||
105 | } else if (item.name() == "window.label.active.textColor") { | 105 | } else if (item.name() == "window.label.active.textColor") { |
106 | return FbTk::ThemeManager::instance().loadItem(item, "window.label.unfocus.textColor", | 106 | return FbTk::ThemeManager::instance().loadItem(item, "window.label.unfocus.textColor", |
107 | "Window.Label.Unfocus.TextColor"); | 107 | "Window.Label.Unfocus.TextColor"); |
108 | } else if (item.name() == "window.alpha") { | ||
109 | *m_alpha = 255; | ||
110 | return true; | ||
111 | } | 108 | } |
112 | 109 | ||
113 | return false; | 110 | return false; |
114 | } | 111 | } |
115 | 112 | ||
116 | void FbWinFrameTheme::reconfigTheme() { | 113 | void FbWinFrameTheme::reconfigTheme() { |
117 | if (*m_alpha > 255) | ||
118 | *m_alpha = 255; | ||
119 | else if (*m_alpha < 0) | ||
120 | *m_alpha = 0; | ||
121 | |||
122 | if (*m_bevel_width > 20) | 114 | if (*m_bevel_width > 20) |
123 | *m_bevel_width = 20; | 115 | *m_bevel_width = 20; |
124 | else if (*m_bevel_width < 0) | 116 | else if (*m_bevel_width < 0) |