diff options
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r-- | src/IconButton.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index c6b876e..2f68ecf 100644 --- a/src/IconButton.cc +++ b/src/IconButton.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: IconButton.cc,v 1.8 2003/09/10 21:41:18 fluxgen Exp $ | 23 | // $Id: IconButton.cc,v 1.9 2003/10/31 10:37:09 rathnor Exp $ |
24 | 24 | ||
25 | #include "IconButton.hh" | 25 | #include "IconButton.hh" |
26 | 26 | ||
@@ -118,7 +118,6 @@ void IconButton::resize(unsigned int width, unsigned int height) { | |||
118 | } | 118 | } |
119 | 119 | ||
120 | void IconButton::clear() { | 120 | void IconButton::clear() { |
121 | FbTk::TextButton::clear(); | ||
122 | setupWindow(); | 121 | setupWindow(); |
123 | } | 122 | } |
124 | 123 | ||
@@ -152,7 +151,7 @@ void IconButton::update(FbTk::Subject *subj) { | |||
152 | m_icon_pixmap.copy(hints->icon_pixmap); | 151 | m_icon_pixmap.copy(hints->icon_pixmap); |
153 | m_icon_pixmap.scale(m_icon_window.height(), m_icon_window.height()); | 152 | m_icon_pixmap.scale(m_icon_window.height(), m_icon_window.height()); |
154 | 153 | ||
155 | m_icon_window.setBackgroundPixmap(m_icon_pixmap.drawable()); | 154 | setBackgroundPixmap(m_icon_pixmap.drawable()); |
156 | } else { | 155 | } else { |
157 | // no icon pixmap | 156 | // no icon pixmap |
158 | m_icon_window.move(0, 0); | 157 | m_icon_window.move(0, 0); |
@@ -186,15 +185,12 @@ void IconButton::update(FbTk::Subject *subj) { | |||
186 | } | 185 | } |
187 | 186 | ||
188 | void IconButton::setupWindow() { | 187 | void IconButton::setupWindow() { |
189 | |||
190 | m_icon_window.clear(); | ||
191 | 188 | ||
192 | if (m_win.clientList().size() == 0) | 189 | if (!m_win.clientList().empty()) { |
193 | return; | 190 | setText(m_win.winClient().title()); |
194 | 191 | // draw with x offset and y offset | |
195 | setText(m_win.winClient().title()); | 192 | } |
196 | // draw with x offset and y offset | 193 | FbTk::TextButton::clear(); |
197 | drawText(); | ||
198 | } | 194 | } |
199 | 195 | ||
200 | void IconButton::drawText(int x, int y) { | 196 | void IconButton::drawText(int x, int y) { |