aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceNameTool.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-13 01:42:52 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-13 01:42:52 (GMT)
commit5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae (patch)
tree06cf36126a38168a767ceaf0f7b877abfc6298e1 /src/WorkspaceNameTool.cc
parentb302dab2f187e364df36237c44b8e48f1e892f04 (diff)
downloadfluxbox-5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae.zip
fluxbox-5b7bde2ffbac62f75cb8539f5ab43bb5f4274eae.tar.bz2
fix initialization of WorkspaceNameTheme
Diffstat (limited to 'src/WorkspaceNameTool.cc')
-rw-r--r--src/WorkspaceNameTool.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc
index 79ac724..6c73df5 100644
--- a/src/WorkspaceNameTool.cc
+++ b/src/WorkspaceNameTool.cc
@@ -45,7 +45,6 @@ WorkspaceNameTool::WorkspaceNameTool(const FbTk::FbWindow &parent,
45 screen.workspaceNamesSig().attach(this); 45 screen.workspaceNamesSig().attach(this);
46 screen.currentWorkspaceSig().attach(this); 46 screen.currentWorkspaceSig().attach(this);
47 theme.reconfigSig().attach(this); 47 theme.reconfigSig().attach(this);
48
49} 48}
50 49
51WorkspaceNameTool::~WorkspaceNameTool() { 50WorkspaceNameTool::~WorkspaceNameTool() {
@@ -132,12 +131,16 @@ void WorkspaceNameTool::updateSizing() {
132} 131}
133 132
134void WorkspaceNameTool::reRender() { 133void WorkspaceNameTool::reRender() {
134 if (m_pixmap)
135 m_screen.imageControl().removeImage(m_pixmap);
136
135 if (m_theme->texture().usePixmap()) { 137 if (m_theme->texture().usePixmap()) {
136 if (m_pixmap)
137 m_screen.imageControl().removeImage(m_pixmap);
138 m_pixmap = m_screen.imageControl().renderImage(width(), height(), 138 m_pixmap = m_screen.imageControl().renderImage(width(), height(),
139 m_theme->texture(), orientation()); 139 m_theme->texture(), orientation());
140 m_button.setBackgroundPixmap(m_pixmap); 140 m_button.setBackgroundPixmap(m_pixmap);
141 } else {
142 m_pixmap = 0;
143 m_button.setBackgroundColor(m_theme->texture().color());
141 } 144 }
142} 145}
143 146
@@ -148,15 +151,7 @@ void WorkspaceNameTool::renderTheme(unsigned char alpha) {
148 m_button.setBorderColor(m_theme->border().color()); 151 m_button.setBorderColor(m_theme->border().color());
149 m_button.setAlpha(alpha); 152 m_button.setAlpha(alpha);
150 153
151 if (!m_theme->texture().usePixmap()) { 154 reRender();
152 if (m_pixmap)
153 m_screen.imageControl().removeImage(m_pixmap);
154 m_pixmap = 0;
155 m_button.setBackgroundColor(m_theme->texture().color());
156 } else {
157 reRender();
158 }
159
160 m_button.clear(); 155 m_button.clear();
161} 156}
162 157