From cd85257a4b1f6b634c08202f88e93ae2d087877d Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 10 Sep 2003 21:22:25 +0000 Subject: fixed loading of color or pixmaps for texture --- src/FbTk/Theme.cc | 28 +++++++++++++++------------- 1 file 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Theme.cc,v 1.17 2003/08/28 23:06:27 fluxgen Exp $ +// $Id: Theme.cc,v 1.18 2003/09/10 21:22:25 fluxgen Exp $ #include "Theme.hh" @@ -100,18 +100,6 @@ template <> void ThemeItem::load() { } -template <> -void ThemeItem::setDefaultValue() { - m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID); -} - -template <> -void ThemeItem::setFromString(const char *str) { - m_value.setFromString(str); - if (m_value.type() == 0) // failed to set value - setDefaultValue(); -} - template <> void ThemeItem::load() { @@ -140,6 +128,20 @@ void ThemeItem::load() { m_value.pixmap() = pm->pixmap().release(); } +template <> +void ThemeItem::setDefaultValue() { + m_value.setType(FbTk::Texture::FLAT | FbTk::Texture::SOLID); + load(); // one might forget to add line something: so we try to load something.*: too +} + +template <> +void ThemeItem::setFromString(const char *str) { + m_value.setFromString(str); + if (m_value.type() == 0) // failed to set value + setDefaultValue(); +} + + // not used template <> -- cgit v0.11.2