mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 15:09:37 +02:00
theme engine: handle title bar button in IsDisabled, IsHot and IsPushed
git-svn-id: trunk@13652 -
This commit is contained in:
parent
3d441b5758
commit
d36fa6b624
@ -2001,7 +2001,9 @@ begin
|
|||||||
|
|
||||||
Result := False;
|
Result := False;
|
||||||
if (Details.Element in [teButton, teToolBar]) or
|
if (Details.Element in [teButton, teToolBar]) or
|
||||||
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) then
|
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) or
|
||||||
|
((Details.Element = teWindow) and (Details.Part >= WP_SYSBUTTON) and
|
||||||
|
(Details.Part <= WP_MDIHELPBUTTON)) then
|
||||||
Result := (Details.State mod 4) = 0; // usual disabled = 4 / 8 / 12
|
Result := (Details.State mod 4) = 0; // usual disabled = 4 / 8 / 12
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2009,7 +2011,9 @@ function TThemeServices.IsPushed(Details: TThemedElementDetails): Boolean;
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if (Details.Element in [teButton, teToolBar, teHeader]) or
|
if (Details.Element in [teButton, teToolBar, teHeader]) or
|
||||||
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) then
|
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) or
|
||||||
|
((Details.Element = teWindow) and (Details.Part >= WP_SYSBUTTON) and
|
||||||
|
(Details.Part <= WP_MDIHELPBUTTON)) then
|
||||||
Result := Details.State in [3, 7, 11];
|
Result := Details.State in [3, 7, 11];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2017,7 +2021,9 @@ function TThemeServices.IsHot(Details: TThemedElementDetails): Boolean;
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
if (Details.Element in [teButton, teToolBar, teHeader]) or
|
if (Details.Element in [teButton, teToolBar, teHeader]) or
|
||||||
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) then
|
((Details.Element = teRebar) and (Details.Part >= RP_BAND)) or
|
||||||
|
((Details.Element = teWindow) and (Details.Part >= WP_SYSBUTTON) and
|
||||||
|
(Details.Part <= WP_MDIHELPBUTTON)) then
|
||||||
Result := Details.State in [2, 6, 10];
|
Result := Details.State in [2, 6, 10];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user