mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 10:59:14 +02:00
Qt5: fixed themed text draw of selected treeview item.
This commit is contained in:
parent
b348ac054c
commit
395b854b3c
@ -695,7 +695,17 @@ begin
|
||||
QPainter_fillRect(Context.Widget, @TextRect, QtSolidPattern);
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
if StyleName = 'windowsvista' then // fix for text of selected treeitem.
|
||||
begin
|
||||
if (Palette <> nil) and (QPalette_currentColorGroup(Palette) = QPaletteActive) then
|
||||
begin
|
||||
AQColor := Default(TQColor);
|
||||
ColorRefToTQColor(ColorToRGB(clWindowText), AQColor);
|
||||
QPalette_setColor(Palette, QPaletteHighlightedText, PQColor(@AQColor));
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
QStyle_drawItemText(Style, Context.Widget, @R,
|
||||
DTFlagsToQtFlags(Flags), Palette,
|
||||
not IsDisabled(Details), @W, QPaletteHighlightedText)
|
||||
|
Loading…
Reference in New Issue
Block a user