aboutsummaryrefslogtreecommitdiff
path: root/src/IconButton.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-10-31 10:37:09 (GMT)
committerrathnor <rathnor>2003-10-31 10:37:09 (GMT)
commitb88f9b2a9e6a08cfb663b7177a9c037250d48fea (patch)
tree6c790fef10cbfdd1eab211572932d7bdf2425d13 /src/IconButton.cc
parentd617c5288fe37972b474f86b653e5541553f93de (diff)
downloadfluxbox-b88f9b2a9e6a08cfb663b7177a9c037250d48fea.zip
fluxbox-b88f9b2a9e6a08cfb663b7177a9c037250d48fea.tar.bz2
fix a number of positioning and sizing issues
Diffstat (limited to 'src/IconButton.cc')
-rw-r--r--src/IconButton.cc18
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
120void IconButton::clear() { 120void 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
188void IconButton::setupWindow() { 187void 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
200void IconButton::drawText(int x, int y) { 196void IconButton::drawText(int x, int y) {