diff options
author | rathnor <rathnor> | 2004-05-24 15:30:52 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-05-24 15:30:52 (GMT) |
commit | 073065ac56b388db1169108d44f37d32f1d19c67 (patch) | |
tree | 3f69de9404adb70507829493771d6fde0bffa017 /src | |
parent | ca307efe3e719fbc3917ae54af4e2243ae0e4044 (diff) | |
download | fluxbox-073065ac56b388db1169108d44f37d32f1d19c67.zip fluxbox-073065ac56b388db1169108d44f37d32f1d19c67.tar.bz2 |
more fixing up of alpha zero-relatd problems - particularly fallback to
255, not zero for alpha items
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrameTheme.cc | 6 | ||||
-rw-r--r-- | src/IconbarTheme.cc | 7 | ||||
-rw-r--r-- | src/ToolTheme.cc | 10 | ||||
-rw-r--r-- | src/ToolbarTheme.cc | 11 | ||||
-rw-r--r-- | src/ToolbarTheme.hh | 4 |
5 files changed, 27 insertions, 11 deletions
diff --git a/src/FbWinFrameTheme.cc b/src/FbWinFrameTheme.cc index ce26a49..e2e89fc 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.17 2004/01/11 16:13:09 fluxgen Exp $ | 22 | // $Id: FbWinFrameTheme.cc,v 1.18 2004/05/24 15:30:52 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbWinFrameTheme.hh" | 24 | #include "FbWinFrameTheme.hh" |
25 | #include "App.hh" | 25 | #include "App.hh" |
@@ -105,8 +105,10 @@ 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; | ||
108 | } | 111 | } |
109 | |||
110 | 112 | ||
111 | return false; | 113 | return false; |
112 | } | 114 | } |
diff --git a/src/IconbarTheme.cc b/src/IconbarTheme.cc index 9710dfc..ec46840 100644 --- a/src/IconbarTheme.cc +++ b/src/IconbarTheme.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: IconbarTheme.cc,v 1.9 2004/04/26 15:04:36 rathnor Exp $ | 23 | // $Id: IconbarTheme.cc,v 1.10 2004/05/24 15:30:52 rathnor Exp $ |
24 | 24 | ||
25 | #include "IconbarTheme.hh" | 25 | #include "IconbarTheme.hh" |
26 | #include "FbTk/App.hh" | 26 | #include "FbTk/App.hh" |
@@ -99,7 +99,10 @@ bool IconbarTheme::fallback(FbTk::ThemeItem_base &item) { | |||
99 | } else if (item.name() == m_name + ".unfocused.textColor") { | 99 | } else if (item.name() == m_name + ".unfocused.textColor") { |
100 | return tm.loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"); | 100 | return tm.loadItem(item, "window.label.unfocus.textColor", "Window.Label.Unfocus.TextColor"); |
101 | } else if (item.name() == m_name + ".alpha") { | 101 | } else if (item.name() == m_name + ".alpha") { |
102 | return tm.loadItem(item, "toolbar.alpha", "Toolbar.Alpha"); | 102 | if (!tm.loadItem(item, "toolbar.alpha", "Toolbar.Alpha")) { |
103 | *m_alpha = 255; | ||
104 | } | ||
105 | return true; | ||
103 | } | 106 | } |
104 | 107 | ||
105 | return false; | 108 | return false; |
diff --git a/src/ToolTheme.cc b/src/ToolTheme.cc index f7dd118..fdcb592 100644 --- a/src/ToolTheme.cc +++ b/src/ToolTheme.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: ToolTheme.cc,v 1.5 2004/01/13 14:41:32 rathnor Exp $ | 23 | // $Id: ToolTheme.cc,v 1.6 2004/05/24 15:30:52 rathnor Exp $ |
24 | 24 | ||
25 | #include "ToolTheme.hh" | 25 | #include "ToolTheme.hh" |
26 | 26 | ||
@@ -48,9 +48,11 @@ bool ToolTheme::fallback(FbTk::ThemeItem_base &item) { | |||
48 | "toolbar.justify", | 48 | "toolbar.justify", |
49 | "Toolbar.Justify"); | 49 | "Toolbar.Justify"); |
50 | } else if (item.name().find(".alpha") != std::string::npos) { | 50 | } else if (item.name().find(".alpha") != std::string::npos) { |
51 | return FbTk::ThemeManager::instance().loadItem(item, | 51 | if (!FbTk::ThemeManager::instance().loadItem(item, |
52 | "toolbar.alpha", | 52 | "toolbar.alpha", |
53 | "Toolbar.Alpha"); | 53 | "Toolbar.Alpha")) |
54 | *m_alpha = 255; | ||
55 | return true; | ||
54 | } | 56 | } |
55 | 57 | ||
56 | return false; | 58 | return false; |
diff --git a/src/ToolbarTheme.cc b/src/ToolbarTheme.cc index 999b142..6b6013f 100644 --- a/src/ToolbarTheme.cc +++ b/src/ToolbarTheme.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: ToolbarTheme.cc,v 1.14 2004/04/26 15:04:37 rathnor Exp $ | 22 | // $Id: ToolbarTheme.cc,v 1.15 2004/05/24 15:30:52 rathnor Exp $ |
23 | 23 | ||
24 | #include "ToolbarTheme.hh" | 24 | #include "ToolbarTheme.hh" |
25 | 25 | ||
@@ -55,7 +55,6 @@ ToolbarTheme::ToolbarTheme(int screen_num): | |||
55 | m_button_size(*this, "toolbar.button.size", "Toolbar.Button.Size") { | 55 | m_button_size(*this, "toolbar.button.size", "Toolbar.Button.Size") { |
56 | // set default value | 56 | // set default value |
57 | *m_bevel_width = 0; | 57 | *m_bevel_width = 0; |
58 | *m_alpha = 255; | ||
59 | *m_shape = false; | 58 | *m_shape = false; |
60 | *m_height = 0; | 59 | *m_height = 0; |
61 | *m_button_size = -1; | 60 | *m_button_size = -1; |
@@ -65,6 +64,14 @@ ToolbarTheme::~ToolbarTheme() { | |||
65 | 64 | ||
66 | } | 65 | } |
67 | 66 | ||
67 | bool ToolbarTheme::fallback(FbTk::ThemeItem_base &item) { | ||
68 | if (item.name() == "toolbar.alpha") { | ||
69 | *m_alpha = 255; | ||
70 | return true; | ||
71 | } | ||
72 | return false; | ||
73 | } | ||
74 | |||
68 | void ToolbarTheme::reconfigTheme() { | 75 | void ToolbarTheme::reconfigTheme() { |
69 | if (*m_alpha > 255) | 76 | if (*m_alpha > 255) |
70 | *m_alpha = 255; | 77 | *m_alpha = 255; |
diff --git a/src/ToolbarTheme.hh b/src/ToolbarTheme.hh index c33dbe8..aa654c8 100644 --- a/src/ToolbarTheme.hh +++ b/src/ToolbarTheme.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: ToolbarTheme.hh,v 1.10 2003/10/13 23:47:38 fluxgen Exp $ | 22 | // $Id: ToolbarTheme.hh,v 1.11 2004/05/24 15:30:52 rathnor Exp $ |
23 | 23 | ||
24 | #ifndef TOOLBARTHEME_HH | 24 | #ifndef TOOLBARTHEME_HH |
25 | #define TOOLBARTHEME_HH | 25 | #define TOOLBARTHEME_HH |
@@ -42,6 +42,8 @@ public: | |||
42 | inline const BorderTheme &border() const { return m_border; } | 42 | inline const BorderTheme &border() const { return m_border; } |
43 | inline const FbTk::Texture &toolbar() const { return *m_toolbar; } | 43 | inline const FbTk::Texture &toolbar() const { return *m_toolbar; } |
44 | 44 | ||
45 | bool fallback(FbTk::ThemeItem_base &item); | ||
46 | |||
45 | inline int bevelWidth() const { return *m_bevel_width; } | 47 | inline int bevelWidth() const { return *m_bevel_width; } |
46 | inline bool shape() const { return *m_shape; } | 48 | inline bool shape() const { return *m_shape; } |
47 | inline unsigned char alpha() const { return *m_alpha; } | 49 | inline unsigned char alpha() const { return *m_alpha; } |