Forum > LCL

'Black on black' combobox items with certain *nix desktops

<< < (3/3)

Sieben:
Thanks a lot for your effort, I really appreciate that.


--- Quote from: wp ---Anyway, here is the excerpt of the env command in all my Linuxes:
--- End quote ---

Ok, I'm very close to giving up as well now... perhaps the best 'solution' to this issue is providing some info here and/or the wiki on how to deal with it should someone experience this on a target system. I think this:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    {$IFDEF UNIX}          // fix for 'black on black' items    if DroppedDown         // with certain gtk2 unix desktops    and (odBackgroundPainted in ItemState)    and not (odSelected in ItemState)    and IsDark(Canvas.Pixels[1,1])    and not IsDark(Canvas.Brush.Color) then    begin      if IsDark(clWindowText) then        Canvas.Font.Color := clHighLightText      else        Canvas.Font.Color := clWindowText;    end;    {$ENDIF}
is about as close as you can get with necessary conditions, but testing any and all linux brands seems almost impossible, even if you add


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    and (GetDefaultLCLWidgetType = lpGtk2)
which would require LCLPlatFormDef in uses of StdCtrls. Anyone with any additional help or ideas...?

lucamar:
Theme drawing in Linux is a mix-match of several layers heavily dependent on the system (or rather, the desktop) configuration: there is the base X layout, over it, the Desktop Engine and base toolkit (qt, gtk, etc.), the Window Manager, the Composition manager and, somewhere in between, the Theme engine,  which can modify nilly-willy almost any sub-set of capabilities of the layers below it.

In these conditions it's almost inevitable that sometimes, for apparently no-reason at all, the theming of some group of applications (those compiled with the same or similar widget libraries) fails to reflect some end-user selections (even default ones).

There's little one can do about it other than trying to recognize the situation and "correct it" somehow, as shown in the previous posts. Or expanding (bloating) your "widget" libs to cope with it. Or going your own way and ignoring the system (like wxWidgets does). Or ...

Such is life in the Savage Wildlands of Linux, home of the Free and Open Sources. 8)

Navigation

[0] Message Index

[*] Previous page

Go to full version