http://bugzilla.novell.com/show_bug.cgi?id=526004
User tlillqvist@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=526004#c7
--- Comment #7 from Tor Lillqvist 2009-08-04 21:03:56 MDT ---
Anyway, the code that draws the menu item separators is in
vcl/source/window/menu.cxx: Menu::ImplPaint():
aTmpPos.Y() = aPos.Y() + ((pData->aSz.Height()-2)/2);
aTmpPos.X() = aPos.X() + 2 + nOuterSpace;
pWin->SetLineColor( rSettings.GetShadowColor() );
pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 -
2*nOuterSpace, aTmpPos.Y() ) );
aTmpPos.Y()++;
pWin->SetLineColor( rSettings.GetLightColor() );
pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 -
2*nOuterSpace, aTmpPos.Y() ) );
pWin->SetLineColor();
I.e. apparently in VCL, a menu item separator is always two pixels high, drawn
as two one-pixel lines in two colors (which might in some cases be the same, of
course).
It hardcodes the use of GetShadowColor() and GetLightColor(). In the Sonar case
at least, the "shadow color" turns out to be greyish and the "light color"
whiteish (but you don't really notice the grey line in the separator, at least
I don't, as the white one is so overwhelmingly bright).
I wonder if the "correct" fix would then be to introduce two new colors in the
StyleSettings's ImplStyleData: upper menu item separator color and lower menu
item separator color?
By default they would be the same as the shadow color and light color. But how
does one get the "correct" ones for them for the gtk+ theme in use? Of course,
in GTK+ a menu item separator is not always just two single-pixel high lines,
but simply a menu item with no contents, and that it in many (most?) themes
indeed appears as two pixels high in two separate colors is just a coincidence.
In some theme it could look very different. Some nasty heuristics are probably
needed...
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.