mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 12:00:18 +02:00
Qt: qtthemes, implemented DrawText of teTooltip
git-svn-id: trunk@29646 -
This commit is contained in:
parent
ffe4871a0b
commit
d832146b1b
@ -318,6 +318,31 @@ var
|
|||||||
TextRect: TRect;
|
TextRect: TRect;
|
||||||
begin
|
begin
|
||||||
case Details.Element of
|
case Details.Element of
|
||||||
|
teToolTip:
|
||||||
|
begin
|
||||||
|
Context := TQtDeviceContext(TCanvas(ACanvas).Handle);
|
||||||
|
W := GetUTF8String(S);
|
||||||
|
Context.save;
|
||||||
|
try
|
||||||
|
if Context.Parent <> nil then
|
||||||
|
Palette := QPalette_create(QWidget_palette(Context.Parent))
|
||||||
|
else
|
||||||
|
Palette := nil;
|
||||||
|
|
||||||
|
if Palette = nil then
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
QStyle_drawItemText(Style, Context.Widget, @R,
|
||||||
|
DTFlagsToQtFlags(Flags), Palette,
|
||||||
|
not IsDisabled(Details), @W, QPaletteToolTipText);
|
||||||
|
finally
|
||||||
|
Context.restore;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
teTreeView:
|
teTreeView:
|
||||||
begin
|
begin
|
||||||
Context := TQtDeviceContext(TCanvas(ACanvas).Handle);
|
Context := TQtDeviceContext(TCanvas(ACanvas).Handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user