From 84421fe81f2b465743db3a54a8a3fcc337bd9154 Mon Sep 17 00:00:00 2001 From: micha Date: Thu, 5 May 2005 14:51:05 +0000 Subject: [PATCH] better looking arrow, not ideal, but better anyway (fixes #760) git-svn-id: trunk@7146 - --- lcl/interfaces/win32/win32int.pp | 5 ++++- lcl/interfaces/win32/win32lclintf.inc | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lcl/interfaces/win32/win32int.pp b/lcl/interfaces/win32/win32int.pp index 8494f21cd7..a2972d4a4c 100644 --- a/lcl/interfaces/win32/win32int.pp +++ b/lcl/interfaces/win32/win32int.pp @@ -241,7 +241,7 @@ Uses Win32WSStdCtrls, // Win32WSToolwin, //////////////////////////////////////////////////// - Calendar, CListBox, Spin, CheckLst, WinExt, LclProc; + Arrow, Calendar, CListBox, Spin, CheckLst, WinExt, LclProc; type { Linked list of objects for events } @@ -301,6 +301,9 @@ End. { ============================================================================= $Log$ + Revision 1.139 2005/05/05 14:51:05 micha + better looking arrow, not ideal, but better anyway (fixes 760) + Revision 1.138 2005/05/05 12:57:43 micha improve click-focus-click implies doubleclick heuristic to check for focus change within handling of mouseclick diff --git a/lcl/interfaces/win32/win32lclintf.inc b/lcl/interfaces/win32/win32lclintf.inc index 1ae21e66d5..3ed2f60b99 100644 --- a/lcl/interfaces/win32/win32lclintf.inc +++ b/lcl/interfaces/win32/win32lclintf.inc @@ -30,14 +30,19 @@ //##apiwiz##sps## // Do not remove procedure TWin32WidgetSet.DrawArrow(Arrow: TComponent; Canvas: TPersistent); +const + { up, down, left, right } + ArrowTypeToState: array[TArrowType] of dword = (DFCS_SCROLLUP, DFCS_SCROLLDOWN, + DFCS_SCROLLLEFT, DFCS_SCROLLRIGHT); +var + drawRect: Windows.RECT; + canvasHandle: HDC; begin - Windows.DrawFrameControl(TCanvas(Canvas).Handle, -{$ifdef VER1_0} - Windows.RECT(TControl(Arrow).ClientRect), -{$else} - TControl(Arrow).ClientRect, -{$endif} - DFC_MENU, DFCS_MENUARROW); + drawRect := TControl(Arrow).ClientRect; + canvasHandle := TCanvas(Canvas).Handle; + Windows.FillRect(canvasHandle, drawRect, GetSysColorBrush(COLOR_BTNFACE)); + Windows.DrawFrameControl(TCanvas(Canvas).Handle, drawRect, + DFC_SCROLL, ArrowTypeToState[TArrow(Arrow).ArrowType]); end; {------------------------------------------------------------------------------ @@ -188,6 +193,9 @@ End; { ============================================================================= $Log$ + Revision 1.22 2005/05/05 14:51:05 micha + better looking arrow, not ideal, but better anyway (fixes 760) + Revision 1.21 2005/02/23 01:12:47 marc + Added RemoveProp winapi call * Some maintenace on winapi/lclintf files