From 3aec082914e9f17af3ae2ba54d67637dfa42be6a Mon Sep 17 00:00:00 2001 From: vincents Date: Mon, 18 Apr 2005 13:15:21 +0000 Subject: [PATCH] draw button background, so that the difference between pushed and non-pushed buttons is clearer. git-svn-id: trunk@7083 - --- ide/buildlazdialog.pas | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ide/buildlazdialog.pas b/ide/buildlazdialog.pas index dacdecc75f..f989398835 100644 --- a/ide/buildlazdialog.pas +++ b/ide/buildlazdialog.pas @@ -740,6 +740,7 @@ var ButtonWidth: Integer; ButtonHeight: Integer; ButtonRect: TRect; + InnerButtonRect: TRect; CurItem: TBuildLazarusItem; CurStr: String; TxtH: Integer; @@ -770,8 +771,17 @@ begin ButtonRect.Right:=x+ButtonWidth; ButtonRect.Bottom:=ButtonRect.Top+ButtonHeight; ButtonState:=DFCS_BUTTONPUSH; - if CurItem.MakeMode=mm then + if CurItem.MakeMode=mm then begin inc(ButtonState,DFCS_PUSHED); + ItemsListBox.Canvas.Brush.Color := clBtnHiLight; + end + else + ItemsListBox.Canvas.Brush.Color := clBtnFace; + // draw button background + InnerButtonRect := ButtonRect; + inc(InnerButtonRect.Top); inc(InnerButtonRect.Left); + dec(InnerButtonRect.Bottom); dec(InnerButtonRect.Right); + ItemsListBox.Canvas.FillRect(InnerButtonRect); DrawFrameControl( ItemsListBox.Canvas.GetUpdatedHandle([csBrushValid,csPenValid]), ButtonRect, DFC_BUTTON, ButtonState);