summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-10 21:22:25 (GMT)
committerfluxgen <fluxgen>2003-09-10 21:22:25 (GMT)
commitcd85257a4b1f6b634c08202f88e93ae2d087877d (patch)
tree646cf81bd59d08e0b7d83381ac02e3499032ea1d /src
parenta3f23b5ec18cb1cb294c43c67a1c43018f1d01eb (diff)
downloadfluxbox_lack-cd85257a4b1f6b634c08202f88e93ae2d087877d.zip
fluxbox_lack-cd85257a4b1f6b634c08202f88e93ae2d087877d.tar.bz2
fixed loading of color or pixmaps for texture
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Theme.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index ed7ba73..fab91b6 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.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: Theme.cc,v 1.17 2003/08/28 23:06:27 fluxgen Exp $ 22// $Id: Theme.cc,v 1.18 2003/09/10 21:22:25 fluxgen Exp $
23 23
24#include "Theme.hh" 24#include "Theme.hh"
25 25
@@ -100,18 +100,6 @@ template <>
100void ThemeItem<FbTk::Font>::load() { 100void ThemeItem<FbTk::Font>::load() {
101} 101}
102 102
103template <>
104void ThemeItem<FbTk::Texture>::setDefaultValue() {
105 m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID);
106}
107
108template <>
109void ThemeItem<FbTk::Texture>::setFromString(const char *str) {
110 m_value.setFromString(str);
111 if (m_value.type() == 0) // failed to set value
112 setDefaultValue();
113}
114
115 103
116template <> 104template <>
117void ThemeItem<FbTk::Texture>::load() { 105void ThemeItem<FbTk::Texture>::load() {
@@ -140,6 +128,20 @@ void ThemeItem<FbTk::Texture>::load() {
140 m_value.pixmap() = pm->pixmap().release(); 128 m_value.pixmap() = pm->pixmap().release();
141} 129}
142 130
131template <>
132void ThemeItem<FbTk::Texture>::setDefaultValue() {
133 m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID);
134 load(); // one might forget to add line something: so we try to load something.*: too
135}
136
137template <>
138void ThemeItem<FbTk::Texture>::setFromString(const char *str) {
139 m_value.setFromString(str);
140 if (m_value.type() == 0) // failed to set value
141 setDefaultValue();
142}
143
144
143 145
144// not used 146// not used
145template <> 147template <>