From c5b79ed14b350130226a5f978edc8c55caa190a3 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 7 Dec 2003 16:39:43 +0000 Subject: usePixmap from Texture --- src/ButtonTool.cc | 7 +++---- src/ClockTool.cc | 4 ++-- src/FbWinFrame.cc | 4 ++-- src/IconbarTool.cc | 8 ++++---- src/Screen.cc | 8 +++----- src/Slit.cc | 7 +++---- src/Toolbar.cc | 4 ++-- src/WorkspaceNameTool.cc | 4 ++-- 8 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/ButtonTool.cc b/src/ButtonTool.cc index 7f350f5..6a3dfa4 100644 --- a/src/ButtonTool.cc +++ b/src/ButtonTool.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ButtonTool.cc,v 1.1 2003/10/13 23:38:17 fluxgen Exp $ +// $Id: ButtonTool.cc,v 1.2 2003/12/07 16:39:43 fluxgen Exp $ #include "ButtonTool.hh" @@ -56,7 +56,7 @@ void ButtonTool::renderTheme() { btn.setBorderWidth(theme().border().width()); Pixmap old_pm = m_cache_pm; - if (theme().texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!theme().texture().usePixmap()) { m_cache_pm = 0; btn.setBackgroundColor(theme().texture().color()); } else { @@ -68,8 +68,7 @@ void ButtonTool::renderTheme() { m_image_ctrl.removeImage(old_pm); old_pm = m_cache_pressed_pm; - if (static_cast(theme()).pressed().type() == - (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (! static_cast(theme()).pressed().usePixmap()) { m_cache_pressed_pm = 0; btn.setPressedColor(static_cast(theme()).pressed().color()); } else { diff --git a/src/ClockTool.cc b/src/ClockTool.cc index c23028f..10b9ad5 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: ClockTool.cc,v 1.7 2003/12/06 16:49:06 fluxgen Exp $ +// $Id: ClockTool.cc,v 1.8 2003/12/07 16:39:43 fluxgen Exp $ #include "ClockTool.hh" @@ -216,7 +216,7 @@ void ClockTool::updateTime() { void ClockTool::renderTheme() { Pixmap old_pm = m_pixmap; - if (m_theme.texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!m_theme.texture().usePixmap()) { m_pixmap = 0; m_button.setBackgroundColor(m_theme.texture().color()); } else { diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 1e3cb97..2ff7203 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrame.cc,v 1.62 2003/10/31 10:37:09 rathnor Exp $ +// $Id: FbWinFrame.cc,v 1.63 2003/12/07 16:39:43 fluxgen Exp $ #include "FbWinFrame.hh" @@ -1024,7 +1024,7 @@ void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, unsigned int w, unsigned int h) { Pixmap tmp = pm; - if (tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!tex.usePixmap()) { pm = None; col = tex.color(); } else diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 80dc5fd..6f5356c 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconbarTool.cc,v 1.18 2003/12/03 00:16:56 fluxgen Exp $ +// $Id: IconbarTool.cc,v 1.19 2003/12/07 16:39:43 fluxgen Exp $ #include "IconbarTool.hh" @@ -416,7 +416,7 @@ void IconbarTool::renderWindow(FluxboxWindow &win) { void IconbarTool::renderTheme() { Pixmap tmp = m_focused_pm; - if (m_theme.focusedTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!m_theme.focusedTexture().usePixmap()) { m_focused_pm = 0; } else { m_focused_pm = m_screen.imageControl().renderImage(m_icon_container.maxWidthPerClient(), @@ -428,7 +428,7 @@ void IconbarTool::renderTheme() { m_screen.imageControl().removeImage(tmp); tmp = m_unfocused_pm; - if (m_theme.unfocusedTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!m_theme.unfocusedTexture().usePixmap()) { m_unfocused_pm = 0; } else { m_unfocused_pm = m_screen.imageControl().renderImage(m_icon_container.maxWidthPerClient(), @@ -440,7 +440,7 @@ void IconbarTool::renderTheme() { // if we dont have any icons then we should render empty texture tmp = m_empty_pm; - if (m_theme.emptyTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!m_theme.emptyTexture().usePixmap()) { m_empty_pm = 0; m_icon_container.setBackgroundColor(m_theme.emptyTexture().color()); } else { diff --git a/src/Screen.cc b/src/Screen.cc index 4a4141e..7ac60d6 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.244 2003/12/04 21:31:02 fluxgen Exp $ +// $Id: Screen.cc,v 1.245 2003/12/07 16:39:43 fluxgen Exp $ #include "Screen.hh" @@ -2160,8 +2160,7 @@ void BScreen::renderGeomWindow() { Pixmap tmp = geom_pixmap; if (winFrameTheme().labelFocusTexture().type() & FbTk::Texture::PARENTRELATIVE) { - if (winFrameTheme().titleFocusTexture().type() == - (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!winFrameTheme().titleFocusTexture().usePixmap()) { geom_pixmap = None; m_geom_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color()); } else { @@ -2170,8 +2169,7 @@ void BScreen::renderGeomWindow() { m_geom_window.setBackgroundPixmap(geom_pixmap); } } else { - if (winFrameTheme().labelFocusTexture().type() == - (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!winFrameTheme().labelFocusTexture().usePixmap()) { geom_pixmap = None; m_geom_window.setBackgroundColor(winFrameTheme().labelFocusTexture().color()); } else { diff --git a/src/Slit.cc b/src/Slit.cc index 422d0e4..6d037d6 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.81 2003/11/01 00:12:53 rathnor Exp $ +// $Id: Slit.cc,v 1.82 2003/12/07 16:39:43 fluxgen Exp $ #include "Slit.hh" @@ -708,9 +708,8 @@ void Slit::reconfigure() { Pixmap tmp = frame.pixmap; FbTk::ImageControl &image_ctrl = screen().imageControl(); const FbTk::Texture &texture = m_slit_theme->texture(); - if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID) && - texture.pixmap().drawable() == 0) { - frame.pixmap = None; + if (!texture.usePixmap()) { + frame.pixmap = 0; frame.window.setBackgroundColor(texture.color()); } else { frame.pixmap = image_ctrl.renderImage(frame.width, frame.height, diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 01d5b60..5ec6480 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.128 2003/12/07 15:27:52 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.129 2003/12/07 16:39:43 fluxgen Exp $ #include "Toolbar.hh" @@ -432,7 +432,7 @@ void Toolbar::reconfigure() { // render frame window Pixmap tmp = m_window_pm; - if (theme().toolbar().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!theme().toolbar().usePixmap()) { m_window_pm = 0; frame.window.setBackgroundColor(theme().toolbar().color()); } else { diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc index fe1fa6f..e0a01f9 100644 --- a/src/WorkspaceNameTool.cc +++ b/src/WorkspaceNameTool.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WorkspaceNameTool.cc,v 1.5 2003/08/26 23:20:07 fluxgen Exp $ +// $Id: WorkspaceNameTool.cc,v 1.6 2003/12/07 16:39:43 fluxgen Exp $ #include "WorkspaceNameTool.hh" @@ -109,7 +109,7 @@ void WorkspaceNameTool::hide() { void WorkspaceNameTool::renderTheme() { Pixmap tmp = m_pixmap; - if (m_theme.texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!m_theme.texture().usePixmap()) { m_pixmap = 0; m_button.setBackgroundColor(m_theme.texture().color()); } else { -- cgit v0.11.2