- const int bullet_size = 3;
-
- switch (screen->getMenuStyle()->bullet) {
- case Square:
- XDrawRectangle(display, menu.frame, pen.gc(), sel_x, sel_y,
- bullet_size * 2, bullet_size * 2);
- break;
-
- case Triangle:
- XPoint tri[3];
+ if ( style->bullet_image.mask != None) {
+ XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
+ sel_x, item_y + menu.item_h/2 - style->bullet_image.h/2);
+ XSetClipMask(blackbox->getXDisplay(), pen.gc(),
+ style->bullet_image.mask);
+
+ 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);
+
+ XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
+
+ XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
+ 0, 0);
+ } else {
+ const int bullet_size = 3;
+
+ switch (screen->getMenuStyle()->bullet) {
+ case Square:
+ XDrawRectangle(display, menu.frame, pen.gc(), sel_x, sel_y,
+ bullet_size * 2, bullet_size * 2);
+ break;
+
+ case Triangle:
+ XPoint tri[3];
+
+ if (screen->getMenuStyle()->bullet_pos == Right) {
+ tri[0].x = sel_x + quarter_w - bullet_size;
+ tri[0].y = sel_y + quarter_w - bullet_size;
+ tri[1].x = 2 * bullet_size;
+ tri[1].y = bullet_size;
+ tri[2].x = -(2 * bullet_size);
+ tri[2].y = bullet_size;
+ } else {
+ tri[0].x = sel_x + quarter_w - bullet_size;
+ tri[0].y = item_y + half_w;
+ tri[1].x = 2 * bullet_size;
+ tri[1].y = bullet_size;
+ tri[2].x = 0;
+ tri[2].y = -(2 * bullet_size);
+ }