From 03fd9e1147cc14a47158215f7693b94c6c514978 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 10 Sep 2003 21:41:18 +0000 Subject: minor bugfixes --- src/IconButton.cc | 25 +++++++++++++++++++------ 1 file 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconButton.cc,v 1.7 2003/08/24 16:24:19 fluxgen Exp $ +// $Id: IconButton.cc,v 1.8 2003/09/10 21:41:18 fluxgen Exp $ #include "IconButton.hh" @@ -98,12 +98,12 @@ void IconButton::exposeEvent(XExposeEvent &event) { if (m_icon_window == event.window) m_icon_window.clear(); else - FbTk::Button::exposeEvent(event); + FbTk::TextButton::exposeEvent(event); } void IconButton::moveResize(int x, int y, unsigned int width, unsigned int height) { - FbTk::Button::moveResize(x, y, width, height); + FbTk::TextButton::moveResize(x, y, width, height); if (m_icon_window.width() != FbTk::Button::width() || m_icon_window.height() != FbTk::Button::height()) @@ -111,17 +111,24 @@ void IconButton::moveResize(int x, int y, } void IconButton::resize(unsigned int width, unsigned int height) { - FbTk::Button::resize(width, height); + FbTk::TextButton::resize(width, height); if (m_icon_window.width() != FbTk::Button::width() || m_icon_window.height() != FbTk::Button::height()) update(0); // update icon window } void IconButton::clear() { - FbTk::Button::clear(); + FbTk::TextButton::clear(); setupWindow(); } +void IconButton::clearArea(int x, int y, + unsigned int width, unsigned int height, + bool exposure) { + FbTk::TextButton::clearArea(x, y, + width, height, exposure); +} + void IconButton::update(FbTk::Subject *subj) { // we got signal that either title or // icon pixmap was updated, @@ -187,6 +194,12 @@ void IconButton::setupWindow() { setText(m_win.winClient().title()); // draw with x offset and y offset - drawText(m_icon_window.x() + m_icon_window.width() + 1); + drawText(); +} + +void IconButton::drawText(int x, int y) { + // offset text + FbTk::TextButton::drawText(m_icon_window.x() + m_icon_window.width() + 1, y); } + -- cgit v0.11.2