From: Scott Moynes Date: Sat, 14 Sep 2002 04:01:20 +0000 (+0000) Subject: Some bitmap bugfixes X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=01732a20dbb6b75431dc34fbe8401bfca952f43a;p=chaz%2Fopenbox Some bitmap bugfixes Fixed parameters to XFillRectangle, remoced old debug code. --- diff --git a/src/Basemenu.cc b/src/Basemenu.cc index 4cddaa97..e54ef19c 100644 --- a/src/Basemenu.cc +++ b/src/Basemenu.cc @@ -627,7 +627,6 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, XSetClipMask(blackbox->getXDisplay(), pen.gc(), style->tick_image.mask); - cout << oppsel_x << ' ' << sel_x << endl; XFillRectangle(blackbox->getXDisplay(), menu.frame, pen.gc(), oppsel_x, item_y + menu.item_h/2 - style->tick_image.h/2, style->tick_image.w, @@ -681,8 +680,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, XFillRectangle(blackbox->getXDisplay(), menu.frame, pen.gc(), sel_x, item_y + menu.item_h/2 - style->bullet_image.h/2, - sel_x + style->bullet_image.w, - item_y + menu.item_h/2 + style->bullet_image.h/2); + style->bullet_image.w, style->bullet_image.h); XSetClipMask(blackbox->getXDisplay(), pen.gc(), None); diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 8c2325b5..d7dc36a4 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -651,8 +651,7 @@ void Toolbar::drawArrow(Drawable surface, bool left) const { XFillRectangle(blackbox->getXDisplay(), surface, pen.gc(), (frame.button_w - style->left_button.w)/2, (frame.button_w - style->left_button.h)/2, - (frame.button_w + style->left_button.w)/2, - (frame.button_w + style->left_button.h)/2); + style->left_button.w, style->left_button.h); XSetClipMask(blackbox->getXDisplay(), pen.gc(), None); XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0); diff --git a/src/Window.cc b/src/Window.cc index 5245a642..8a1b5684 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2628,7 +2628,7 @@ void BlackboxWindow::redrawIconifyButton(bool pressed) const { XFillRectangle(blackbox->getXDisplay(), frame.iconify_button, pen.gc(), (frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2, - (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2); + pm.w, pm.h); XSetClipMask(blackbox->getXDisplay(), pen.gc(), None); XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0); @@ -2679,7 +2679,7 @@ void BlackboxWindow::redrawMaximizeButton(bool pressed) const { XFillRectangle(blackbox->getXDisplay(), frame.maximize_button, pen.gc(), (frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2, - (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2); + pm.w, pm.h); XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 ); XSetClipMask( blackbox->getXDisplay(), pen.gc(), None ); @@ -2767,7 +2767,7 @@ void BlackboxWindow::redrawStickyButton(bool pressed) const { XFillRectangle(blackbox->getXDisplay(), frame.stick_button, pen.gc(), (frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2, - (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2); + pm.w, pm.h); XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );