Does it make more sense to use the fore color instead of the hilight color for menu triangles?
- Yes
- No
0 voters
As “nice” as that maybe – actually having it as a user-configurable resource via ‘MenuStyle’ would be much nicer.
– Thomas Adam
Does it make more sense to use the fore color instead of the hilight color for menu triangles?
0 voters
As “nice” as that maybe – actually having it as a user-configurable resource via ‘MenuStyle’ would be much nicer.
– Thomas Adam
I totally agree, anybody willing to write a patch to do that?
Well, that’s how you like it, but there may be people that want to have a white font and green triangles on a black background
Heres one I made earlier
Patch for menuitem.c:
[code]— menuitem.c 2005-07-27 22:11:06.000000000 +0000
+++ menuitem.c.new 2005-11-13 18:59:46.000000000 +0000
@@ -715,12 +715,26 @@
is_item_selected)
{
/* triangle is in hilighted area */
tmp_gc = gcs.hilight_gc;
if(ST_TRIANGLES_USE_FORE(ms))
{
tmp_gc = gcs.fore_gc;
}
else
{
tmp_gc = gcs.hilight_gc;
}
}
else
{
/* triangle is in unhilighted area */
tmp_gc = off_gcs.hilight_gc;
if(ST_TRIANGLES_USE_FORE(ms))
{
tmp_gc = off_gcs.fore_gc;
}
else
{
tmp_gc = off_gcs.hilight_gc;
}
}
y = y_offset + (y_height - MENU_TRIANGLE_HEIGHT +
relief_thickness) / 2;
[/code]
Patch for menustyle.c:
[code]— menustyle.c 2005-08-07 09:43:25.000000000 +0000
+++ menustyle.c.new 2005-11-13 18:59:46.000000000 +0000
@@ -348,6 +348,7 @@
“PopdownDelay”,
“PopupActiveArea”,
“PopupIgnore”, “PopupClose”,
"TrianglesUseFore",
NULL
};@@ -1287,6 +1288,9 @@
ST_DO_POPUP_AS(tmpms) = MDP_CLOSE;
break;
case 56: /* TrianglesUseFore */
ST_TRIANGLES_USE_FORE(tmpms) = 1;
break;
#if 0
case 99: /* PositionHints /
/ to be implemented */
[/code]
Patch for menustyle.h
[code]— menustyle.h 2005-07-27 22:11:07.000000000 +0000
+++ menustyle.h.new 2005-11-13 18:59:46.000000000 +0000
@@ -48,6 +48,8 @@
((m)->s->ms->look.flags.is_item_relief_reversed)
#define ST_USING_DEFAULT_FONT(s) ((s)->look.flags.using_default_font)
#define MST_USING_DEFAULT_FONT(m) ((m)->s->ms->look.flags.using_default_font)
+#define ST_TRIANGLES_USE_FORE(s) ((s)->look.flags.triangles_use_fore)
+#define MST_TRIANGLES_USE_FORE(m) ((m)->s->ms->look.flags.triangles_use_fore)
#define ST_RELIEF_THICKNESS(s) ((s)->look.ReliefThickness)
#define MST_RELIEF_THICKNESS(m) ((m)->s->ms->look.ReliefThickness)
#define ST_TITLE_UNDERLINES(s) ((s)->look.TitleUnderlines)
@@ -229,6 +231,7 @@
unsigned has_greyed_cset : 1;
unsigned is_item_relief_reversed : 1;
unsigned using_default_font : 1;
unsigned triangles_use_fore : 1;
} flags;To use it just put “TrianglesUseFore” into a MenuStyle, e.g.:
MenuStyle * Font "xft:Verdona:bold:pixelsize=10:minspace=True"
MenuStyle * MenuColorset 0, ActiveFore, ActiveColorset 1, Hilight3DOff, HilightBack, SeparatorsLong
MenuStyle * BorderWidth 2
MenuStyle * TrianglesSolid, TrianglesUseFore
MenuStyle * VerticalItemSpacing 1 1
MenuStyle * ItemFormat "%.2|%i%.5l%.5l%.5l%2.3>%2|"
MenuStyle * PopupDelay 250, PopupOffset 0 100
Heres the finished product (just the same as tln’s), with TrianglesUseFore:
and without:
rhinovirus