From c95d982d72ea8f580aadc9d4c99c880e2978502f Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 17 Dec 2015 18:26:08 +0000 Subject: [PATCH] LCL: toolbutton: fix down states. Issue #28286. Modified patch by Derit Agustin git-svn-id: trunk@50870 - --- lcl/include/toolbutton.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lcl/include/toolbutton.inc b/lcl/include/toolbutton.inc index 57e6dba400..6cd47f3b9c 100644 --- a/lcl/include/toolbutton.inc +++ b/lcl/include/toolbutton.inc @@ -903,17 +903,19 @@ begin begin if Down then begin // checked states - if FMouseInControl then + if (tbfPressed in FToolButtonFlags) and FMouseInControl then + inc(ToolDetail, 2) // ttbButtonPressed + else if FMouseInControl then inc(ToolDetail, 5) // ttbButtonCheckedHot else - inc(ToolDetail, 4) // ttbButtonChecked + inc(ToolDetail, 4);// ttbButtonChecked end else begin if (tbfPressed in FToolButtonFlags) and FMouseInControl then - inc(ToolDetail, 2) else // ttbButtonPressed - if FMouseInControl then - inc(ToolDetail, 1); // ttbButtonHot + inc(ToolDetail, 2) // ttbButtonPressed + else if FMouseInControl then + inc(ToolDetail, 1);// ttbButtonHot end; end; Result := ThemeServices.GetElementDetails(ToolDetail);