]> Dogcows Code - chaz/openbox/blobdiff - src/Basemenu.cc
dont reconfigure during startup. thats a waste and screws up stuff!
[chaz/openbox] / src / Basemenu.cc
index 9462abacf94dfef898fb7f1f7a0e1712b1e536d7..57c10fcb65223defa2e2615fc55418b538247e95 100644 (file)
@@ -557,8 +557,11 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
   }
 
   MenuStyle *style = screen->getMenuStyle();
-  BPen pen((highlight || item->isSelected()) ? style->h_text : style->f_text),
-      hipen(style->hilite.color());
+  BPen hipen(style->hilite.color());
+  // match the text color
+  BPen pen((highlight ? style->h_text :
+            (item->isEnabled() ? style->f_text :
+             style->d_text)));
 
 
   sel_x = item_x;
@@ -609,7 +612,14 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
   if (dosel && item->isSelected()) {
       XPoint pts[6];
 
-      pts[0].x = sel_x + 0;
+      // put the check mark on the opposite side of the menu
+      int x = sel_x;
+      if (screen->getMenuStyle()->bullet_pos == Right)
+        x -= (menu.item_w - menu.item_h - menu.bevel_w);
+      else
+        x += (menu.item_w - menu.item_h - menu.bevel_w);
+
+      pts[0].x = x + 0;
       pts[0].y = sel_y + 2;
       
       pts[1].x = 0;
@@ -621,13 +631,14 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
       pts[3].x = 5;
       pts[3].y = -5;
       
+      
       pts[4].x = 0;
       pts[4].y = -3;
       
       pts[5].x = -5;
       pts[5].y = 5;
 
-      XFillPolygon(display, menu.frame, pen.gc(), pts, 6, Complex,
+      XFillPolygon(display, menu.frame, pen.gc(), pts, 6, Nonconvex,
                    CoordModePrevious);
   }
 
This page took 0.021818 seconds and 4 git commands to generate.