mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 19:02:31 +02:00
Gtk2: fixed issue with treeview theme drawings.Patch by Bart Broersma. issue #16376
git-svn-id: trunk@31778 -
This commit is contained in:
parent
af479147ae
commit
7b1a94365c
@ -88,6 +88,7 @@ type
|
|||||||
const R: TRect; ClipRect: PRect); override;
|
const R: TRect; ClipRect: PRect); override;
|
||||||
|
|
||||||
procedure DrawIcon(DC: HDC; Details: TThemedElementDetails; const R: TRect; himl: HIMAGELIST; Index: Integer); override;
|
procedure DrawIcon(DC: HDC; Details: TThemedElementDetails; const R: TRect; himl: HIMAGELIST; Index: Integer); override;
|
||||||
|
procedure DrawText(ACanvas: TPersistent; Details: TThemedElementDetails; const S: String; R: TRect; Flags, Flags2: Cardinal); virtual; overload;
|
||||||
procedure DrawText(DC: HDC; Details: TThemedElementDetails; const S: String; R: TRect; Flags, Flags2: Cardinal); override;
|
procedure DrawText(DC: HDC; Details: TThemedElementDetails; const S: String; R: TRect; Flags, Flags2: Cardinal); override;
|
||||||
|
|
||||||
function ContentRect(DC: HDC; Details: TThemedElementDetails; BoundingRect: TRect): TRect; override;
|
function ContentRect(DC: HDC; Details: TThemedElementDetails; BoundingRect: TRect): TRect; override;
|
||||||
@ -559,7 +560,7 @@ begin
|
|||||||
case Details.State of
|
case Details.State of
|
||||||
TREIS_SELECTED,
|
TREIS_SELECTED,
|
||||||
TREIS_HOTSELECTED: Result.State := GTK_STATE_SELECTED;
|
TREIS_HOTSELECTED: Result.State := GTK_STATE_SELECTED;
|
||||||
TREIS_SELECTEDNOTFOCUS: Result.State := GTK_STATE_ACTIVE;
|
TREIS_SELECTEDNOTFOCUS: Result.State := GTK_STATE_SELECTED; //Was: GTK_STATE_ACTIVE;
|
||||||
TREIS_HOT: Result.State := GTK_STATE_PRELIGHT;
|
TREIS_HOT: Result.State := GTK_STATE_PRELIGHT;
|
||||||
TREIS_DISABLED: Result.State := GTK_STATE_INSENSITIVE;
|
TREIS_DISABLED: Result.State := GTK_STATE_INSENSITIVE;
|
||||||
else
|
else
|
||||||
@ -934,6 +935,16 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGtk2ThemeServices.DrawText(ACanvas: TPersistent;
|
||||||
|
Details: TThemedElementDetails; const S: String; R: TRect; Flags,
|
||||||
|
Flags2: Cardinal);
|
||||||
|
begin
|
||||||
|
if ThemesEnabled then
|
||||||
|
DrawText(TCanvas(ACanvas).Handle, Details, S, R, Flags, Flags2)
|
||||||
|
else
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TGtk2ThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails;
|
procedure TGtk2ThemeServices.DrawText(DC: HDC; Details: TThemedElementDetails;
|
||||||
const S: String; R: TRect; Flags, Flags2: Cardinal);
|
const S: String; R: TRect; Flags, Flags2: Cardinal);
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user