all repos — fluxbox @ 03fd9e1147cc14a47158215f7693b94c6c514978

custom fork of the fluxbox windowmanager

minor bugfixes
fluxgen fluxgen
commit

03fd9e1147cc14a47158215f7693b94c6c514978

parent

3b66daeaa2ba9c74bbaaced341e5523e6f320c31

1 files changed, 19 insertions(+), 6 deletions(-)

jump to
M src/IconButton.ccsrc/IconButton.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ update(0); // update icon window

} 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 @@ return;

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); +} + +