summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/fpg_splitter.pas20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/fpg_splitter.pas b/src/gui/fpg_splitter.pas
index 6094656b..8a5aa3d3 100644
--- a/src/gui/fpg_splitter.pas
+++ b/src/gui/fpg_splitter.pas
@@ -61,6 +61,7 @@ type
procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override;
procedure HandleMouseEnter; override;
procedure HandleMouseExit; override;
+ procedure HandleDoubleClick(x, y: integer; button: word; shiftstate: TShiftState); override;
procedure HandlePaint; override;
procedure StopSizing; dynamic;
Procedure DrawGrabBar(ARect: TfpgRect); virtual;
@@ -304,6 +305,25 @@ begin
Repaint;
end;
+procedure TfpgSplitter.HandleDoubleClick(x, y: integer; button: word;
+ shiftstate: TShiftState);
+begin
+ inherited HandleDoubleClick(x, y, button, shiftstate);
+ if FAutoSnap then
+ begin
+ if FNewSize = 0 then
+ begin
+ FNewSize := FMinSize+1;
+ DoCanResize(FNewSize);
+ end
+ else
+ begin
+ FNewSize := 0;
+ DoCanResize(FNewSize);
+ end;
+ end;
+end;
+
procedure TfpgSplitter.HandlePaint;
var
lRect: TfpgRect;