X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FBasemenu.cc;h=3c096eff59f4423b96f4aefd327e3e38dad6df00;hb=9af642d29918e8b36d7f1fd17e4c771662d4fe97;hp=4cddaa97d09b403d6f08da561d742393cbeadbb8;hpb=c2d992a35c11b8212bf390528d9828a815e8b5fd;p=chaz%2Fopenbox diff --git a/src/Basemenu.cc b/src/Basemenu.cc index 4cddaa97..3c096eff 100644 --- a/src/Basemenu.cc +++ b/src/Basemenu.cc @@ -447,6 +447,7 @@ void Basemenu::redrawTitle(void) { break; } + XClearWindow(display, menu.title); style->t_font->drawString(menu.title, dx, menu.bevel_w, style->t_text, text); } @@ -610,6 +611,11 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, dooppsel = False; } +#ifdef XFT + if (dotext) + XClearArea(display, menu.frame, text_x, text_y , text_w, text_h, False); +#endif // XFT + if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) { if (menu.hilite_pixmap) XCopyArea(display, menu.hilite_pixmap, menu.frame, @@ -621,13 +627,13 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, } if (dooppsel && item->isSelected()) { +#ifdef BITMAPBUTTONS if ( style->tick_image.mask != None) { XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), oppsel_x, item_y + menu.item_h/2 - style->tick_image.h/2); 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, @@ -638,6 +644,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0); } else { +#endif // BITMAPBUTTONS XPoint pts[6]; pts[0].x = oppsel_x + 0; @@ -661,7 +668,9 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, XFillPolygon(display, menu.frame, pen.gc(), pts, 6, Nonconvex, CoordModePrevious); +#ifdef BITMAPBUTTONS } +#endif // BITMAPBUTTONS } if (dotext && text) { @@ -673,6 +682,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, } if (dosel && item->submenu()) { +#ifdef BITMAPBUTTONS if ( style->bullet_image.mask != None) { XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), sel_x, item_y + menu.item_h/2 - style->bullet_image.h/2); @@ -681,14 +691,14 @@ 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); XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0); } else { +#endif // BITMAPBUTTONS const int bullet_size = 3; switch (screen->getMenuStyle()->bullet) { @@ -736,7 +746,9 @@ void Basemenu::drawItem(int index, bool highlight, bool clear, CoordModePrevious); break; } +#ifdef BITMAPBUTTONS } +#endif // BITMAPBUTTONS } }