diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-04 16:47:15 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-04 16:47:15 +0200 |
commit | 1db98a1775c3f4caba4ba7a52180eb48eac6d5fc (patch) | |
tree | ad44a14f1eec0fc68b4bd45e225ec71d6cb482e9 | |
parent | 0b86c860b45f3adfafef0cf72330392320ffdfdc (diff) | |
download | fpGUI-1db98a1775c3f4caba4ba7a52180eb48eac6d5fc.tar.xz |
Splitter grabbar color is now a system color.
-rw-r--r-- | src/corelib/fpg_main.pas | 1 | ||||
-rw-r--r-- | src/gui/fpg_splitter.pas | 14 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index 2fe5f200..cdec3a9b 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -1906,6 +1906,7 @@ begin fpgSetNamedColor(clGridSelectionText, $FFFFFF); // same as clSelectionText fpgSetNamedColor(clGridInactiveSel, $D0D0FF); // same as clInactiveSel fpgSetNamedColor(clGridInactiveSelText, $000000); // same as clInactiveSelText + fpgSetNamedColor(clSplitterGrabBar, $839EFE); // pale blue // Global Font Objects diff --git a/src/gui/fpg_splitter.pas b/src/gui/fpg_splitter.pas index eabc2bd2..066727e4 100644 --- a/src/gui/fpg_splitter.pas +++ b/src/gui/fpg_splitter.pas @@ -28,12 +28,8 @@ uses fpg_main, fpg_widget; -const - clColorGrabBar = $839EFE; // Pale navy blue - cSplitterWidth = 8; type - NaturalNumber = 1..High(Integer); TfpgSnapEvent = procedure(Sender: TObject; const AClosed: boolean) of object; @@ -73,7 +69,7 @@ type destructor Destroy; override; published property AutoSnap: boolean read FAutoSnap write FAutoSnap default True; - property ColorGrabBar: TfpgColor read FColorGrabBar write SetColorGrabBar default clColorGrabBar; + property ColorGrabBar: TfpgColor read FColorGrabBar write SetColorGrabBar default clSplitterGrabBar; property OnSnap: TfpgSnapEvent read FOnSnap write FOnSnap; end; @@ -82,6 +78,10 @@ function CreateSplitter(AOwner: TComponent; ALeft, ATop, AWidth, AHeight: TfpgCo implementation +const + cSplitterWidth = 8; + + function CreateSplitter(AOwner: TComponent; ALeft, ATop, AWidth, AHeight: TfpgCoord; AnAlign: TAlign): TfpgSplitter; begin @@ -253,7 +253,9 @@ begin Inc(FMaxSize, FControl.Height); end; UpdateSize(X, Y); + CaptureMouse; + {AllocateLineDC; with ValidParentForm(Self) do if ActiveControl <> nil then @@ -493,7 +495,7 @@ begin // FResizeStyle := rsPattern; FOldSize := -1; FMouseOver := False; - FColorGrabBar := clColorGrabBar; + FColorGrabBar := clSplitterGrabBar; end; destructor TfpgSplitter.Destroy; |