mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 04:19:47 +02:00
Gtk3: fixed TGtk3Window.GetClientRect, must subtract scrollbar sizes if overlay scrollbars are used.
This commit is contained in:
parent
28a04f2144
commit
fff12f1750
@ -8865,7 +8865,6 @@ begin
|
||||
end;
|
||||
|
||||
Result := Rect(0, 0, AWindow^.get_width - VOffset, AWindow^.get_height - HOffset);
|
||||
|
||||
end else
|
||||
begin
|
||||
//we are not ready, provide at least scrolledwindow size as clientrect for now.
|
||||
@ -9595,6 +9594,12 @@ begin
|
||||
|
||||
Result := R;
|
||||
Types.OffsetRect(Result, -Result.Left, -Result.Top);
|
||||
|
||||
if GTK3WidgetSet.OverlayScrolling and getHorizontalScrollbar^.is_visible then
|
||||
Result.Height := Result.Height - getHorizontalScrollbar^.get_allocated_height;
|
||||
if GTK3WidgetSet.OverlayScrolling and getVerticalScrollbar^.is_visible then
|
||||
Result.Width := Result.Width - getVerticalScrollbar^.get_allocated_width;
|
||||
|
||||
{$IFDEF GTK3DEBUGFORMS}
|
||||
DebugLn('TGtk3Window.GetClientRect ',dbgsName(LCLObject),' Result ',dbgs(Result),' CentralWidget mapped ? ',dbgs(FCentralWidget^.get_mapped),' Realized ? ',dbgs(FCentralWidget^.get_realized));
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user