diff options
author | fluxgen <fluxgen> | 2003-09-10 21:41:18 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-09-10 21:41:18 (GMT) |
commit | 03fd9e1147cc14a47158215f7693b94c6c514978 (patch) | |
tree | 1b7935414bfe18fc59f1a613197a1eb13682c443 | |
parent | 3b66daeaa2ba9c74bbaaced341e5523e6f320c31 (diff) | |
download | fluxbox-03fd9e1147cc14a47158215f7693b94c6c514978.zip fluxbox-03fd9e1147cc14a47158215f7693b94c6c514978.tar.bz2 |
minor bugfixes
-rw-r--r-- | src/IconButton.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc index 1ca20b7..c6b876e 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.7 2003/08/24 16:24:19 fluxgen Exp $ | 23 | // $Id: IconButton.cc,v 1.8 2003/09/10 21:41:18 fluxgen Exp $ |
24 | 24 | ||
25 | #include "IconButton.hh" | 25 | #include "IconButton.hh" |
26 | 26 | ||
@@ -98,12 +98,12 @@ void IconButton::exposeEvent(XExposeEvent &event) { | |||
98 | if (m_icon_window == event.window) | 98 | if (m_icon_window == event.window) |
99 | m_icon_window.clear(); | 99 | m_icon_window.clear(); |
100 | else | 100 | else |
101 | FbTk::Button::exposeEvent(event); | 101 | FbTk::TextButton::exposeEvent(event); |
102 | } | 102 | } |
103 | void IconButton::moveResize(int x, int y, | 103 | void IconButton::moveResize(int x, int y, |
104 | unsigned int width, unsigned int height) { | 104 | unsigned int width, unsigned int height) { |
105 | 105 | ||
106 | FbTk::Button::moveResize(x, y, width, height); | 106 | FbTk::TextButton::moveResize(x, y, width, height); |
107 | 107 | ||
108 | if (m_icon_window.width() != FbTk::Button::width() || | 108 | if (m_icon_window.width() != FbTk::Button::width() || |
109 | m_icon_window.height() != FbTk::Button::height()) | 109 | m_icon_window.height() != FbTk::Button::height()) |
@@ -111,17 +111,24 @@ void IconButton::moveResize(int x, int y, | |||
111 | } | 111 | } |
112 | 112 | ||
113 | void IconButton::resize(unsigned int width, unsigned int height) { | 113 | void IconButton::resize(unsigned int width, unsigned int height) { |
114 | FbTk::Button::resize(width, height); | 114 | FbTk::TextButton::resize(width, height); |
115 | if (m_icon_window.width() != FbTk::Button::width() || | 115 | if (m_icon_window.width() != FbTk::Button::width() || |
116 | m_icon_window.height() != FbTk::Button::height()) | 116 | m_icon_window.height() != FbTk::Button::height()) |
117 | update(0); // update icon window | 117 | update(0); // update icon window |
118 | } | 118 | } |
119 | 119 | ||
120 | void IconButton::clear() { | 120 | void IconButton::clear() { |
121 | FbTk::Button::clear(); | 121 | FbTk::TextButton::clear(); |
122 | setupWindow(); | 122 | setupWindow(); |
123 | } | 123 | } |
124 | 124 | ||
125 | void IconButton::clearArea(int x, int y, | ||
126 | unsigned int width, unsigned int height, | ||
127 | bool exposure) { | ||
128 | FbTk::TextButton::clearArea(x, y, | ||
129 | width, height, exposure); | ||
130 | } | ||
131 | |||
125 | void IconButton::update(FbTk::Subject *subj) { | 132 | void IconButton::update(FbTk::Subject *subj) { |
126 | // we got signal that either title or | 133 | // we got signal that either title or |
127 | // icon pixmap was updated, | 134 | // icon pixmap was updated, |
@@ -187,6 +194,12 @@ void IconButton::setupWindow() { | |||
187 | 194 | ||
188 | setText(m_win.winClient().title()); | 195 | setText(m_win.winClient().title()); |
189 | // draw with x offset and y offset | 196 | // draw with x offset and y offset |
190 | drawText(m_icon_window.x() + m_icon_window.width() + 1); | 197 | drawText(); |
198 | } | ||
199 | |||
200 | void IconButton::drawText(int x, int y) { | ||
201 | // offset text | ||
202 | FbTk::TextButton::drawText(m_icon_window.x() + m_icon_window.width() + 1, y); | ||
191 | } | 203 | } |
204 | |||
192 | 205 | ||