From ac646e98b7084c9d7f99f4f592013542dd60733d Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 18 May 2013 13:56:08 +0000 Subject: [PATCH] lcl: give better explanation why non-Flat toolbars draws their buttons with Hot state git-svn-id: trunk@41256 - --- lcl/include/toolbutton.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lcl/include/toolbutton.inc b/lcl/include/toolbutton.inc index aa6ff6fc75..dfa4b881ae 100644 --- a/lcl/include/toolbutton.inc +++ b/lcl/include/toolbutton.inc @@ -316,7 +316,13 @@ begin // draw button if (Style in [tbsButton, tbsDropDown, tbsCheck]) then begin - // if toolbar is not flat then normal and disabled state is drawn as hot + // non-Flat toolbars come from old windows where you was able to set how + // to draw it by adjusting toolbar window options + // with current windows toolbars should be drawn using Theme + // so let's treat flat toolbars as starndard toolbars and draw them using ThemeManager + // and to draw a non-Flat toolbars we need to somehow mimic always raised state + // of their buttons - a good way is to draw them using Hot style also for + // normal and disables states TempDetails := Details; if ((FToolBar <> nil) and not FToolBar.Flat) and (TempDetails.State in [1, 4]) then TempDetails.State := 2;