Skip to content

Commit 1363b16

Browse files
lucasalberticlaude
authored andcommitted
fix: splitter between query editor and results not draggable on macOS
On Cocoa, the native NSTabView frame of a TTabControl extends a few pixels above its LCL bounds (TCocoaTabControl.lclGetFrameToLayoutDelta: 6px in Lazarus 4.4, 5px in 4.8). tabsetQuery sits right below the 5px high spltQuery, so it covered the splitter and swallowed its mouse events. Add a top border spacing to tabsetQuery on macOS, also for query tabs created later. Closes #2620 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f1a1904 commit 1363b16

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎source/main.pas‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,6 +1991,12 @@ procedure TMainForm.FormCreate(Sender: TObject);
19911991
QueryTab.spltHelpers := spltQueryHelpers;
19921992
QueryTab.spltQuery := spltQuery;
19931993
QueryTab.tabsetQuery := tabsetQuery;
1994+
{$IFDEF DARWIN}
1995+
// The native NSTabView frame of a TTabControl extends some pixels above its LCL bounds (see
1996+
// TCocoaTabControl.lclGetFrameToLayoutDelta: 6px in Lazarus 4.4, 5px in 4.8), covering
1997+
// spltQuery and swallowing its mouse events
1998+
tabsetQuery.BorderSpacing.Top := 6;
1999+
{$ENDIF}
19942000
//InheritFont(QueryTab.tabsetQuery.Font);
19952001
QueryTab.ResultTabs := TResultTabs.Create(True);
19962002

@@ -12879,6 +12885,7 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
1287912885
// Prevent various problems with alignment of controls. See http://www.heidisql.com/forum.php?t=18924
1288012886
QueryTab.tabsetQuery.Top := QueryTab.spltQuery.Top + QueryTab.spltQuery.Height;
1288112887
QueryTab.tabsetQuery.Align := tabsetQuery.Align;
12888+
QueryTab.tabsetQuery.BorderSpacing.Top := tabsetQuery.BorderSpacing.Top;
1288212889
QueryTab.tabsetQuery.Font.Assign(tabsetQuery.Font);
1288312890
QueryTab.tabsetQuery.Images := tabsetQuery.Images;
1288412891
QueryTab.tabsetQuery.ShowHint := tabsetQuery.ShowHint;

0 commit comments

Comments
 (0)