mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 13:19:21 +02:00
LCL-GTK2: Draw TToolButton correctly in TGtk2ThemeServices. Issue #33536, patch from Yuriy Kopnin.
git-svn-id: trunk@57583 -
This commit is contained in:
parent
9d840e6fad
commit
e12c19d97c
@ -375,7 +375,7 @@ begin
|
|||||||
TS_PRESSED, TS_CHECKED, TS_HOTCHECKED:
|
TS_PRESSED, TS_CHECKED, TS_HOTCHECKED:
|
||||||
Result.Shadow := GTK_SHADOW_IN;
|
Result.Shadow := GTK_SHADOW_IN;
|
||||||
TS_HOT:
|
TS_HOT:
|
||||||
Result.Shadow := GTK_SHADOW_ETCHED_OUT;
|
Result.Shadow := GTK_SHADOW_OUT;
|
||||||
else
|
else
|
||||||
Result.Shadow := GTK_SHADOW_NONE;
|
Result.Shadow := GTK_SHADOW_NONE;
|
||||||
end;
|
end;
|
||||||
@ -383,7 +383,6 @@ begin
|
|||||||
begin
|
begin
|
||||||
case Details.State of
|
case Details.State of
|
||||||
TS_DISABLED: Result.State := GTK_STATE_INSENSITIVE;
|
TS_DISABLED: Result.State := GTK_STATE_INSENSITIVE;
|
||||||
//TS_HOT: Result.State := GTK_STATE_ACTIVE; // << painting bug in Laz+Gtk2
|
|
||||||
else
|
else
|
||||||
Result.State := GTK_STATE_NORMAL;
|
Result.State := GTK_STATE_NORMAL;
|
||||||
end;
|
end;
|
||||||
@ -391,8 +390,7 @@ begin
|
|||||||
Result.State := GtkButtonMap[Details.State];
|
Result.State := GtkButtonMap[Details.State];
|
||||||
|
|
||||||
Result.IsHot := Details.State in [TS_HOT, TS_HOTCHECKED];
|
Result.IsHot := Details.State in [TS_HOT, TS_HOTCHECKED];
|
||||||
if Result.Style = nil then
|
Result.Style := GetStyle(lgsButton);
|
||||||
Result.Style := GetStyle(lgsToolButton);
|
|
||||||
if (Details.Part = TP_SPLITBUTTONDROPDOWN) then
|
if (Details.Part = TP_SPLITBUTTONDROPDOWN) then
|
||||||
begin
|
begin
|
||||||
Result.Detail := 'arrow';
|
Result.Detail := 'arrow';
|
||||||
|
Loading…
Reference in New Issue
Block a user