mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 00:59:15 +02:00
Gtk3: use GtkLayout instead of GtkFixed for TTabSheet handle, adjust TGtk3GroupBox client rect in sizeAllocate event if needed
This commit is contained in:
parent
9940ea00d9
commit
5b6aa6bc5b
@ -3759,6 +3759,9 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
if ACtl.LCLObject.ClientRectNeedsInterfaceUpdate then
|
||||
ACtl.LCLObject.DoAdjustClientRectChange;
|
||||
|
||||
FillChar(Msg{%H-}, SizeOf(Msg), #0);
|
||||
|
||||
Msg.Msg := LM_SIZE;
|
||||
@ -5059,16 +5062,16 @@ end;
|
||||
|
||||
function TGtk3Page.CreateWidget(const Params: TCreateParams): PGtkWidget;
|
||||
begin
|
||||
FWidgetType := FWidgetType + [wtContainer];
|
||||
FWidgetType := FWidgetType + [wtLayout];
|
||||
FPageLabel:= TGtkLabel.new(PChar(Params.Caption));
|
||||
FPageLabel^.set_use_underline(true);
|
||||
Self.FHasPaint:=true;
|
||||
// ref it to save it in case TabVisible is set to false
|
||||
FPageLabel^.ref;
|
||||
Result := TGtkHBox.new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
FCentralWidget := TGtkFixed.new;
|
||||
PGtkHBox(Result)^.pack_start(FCentralWidget, True , True, 0);
|
||||
PGtkFixed(FCentralWidget)^.set_has_window(True);
|
||||
Result := TGtkBox.new(GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
FCentralWidget := TGtkLayout.new(nil, nil);
|
||||
PGtkBox(Result)^.pack_start(FCentralWidget, True , True, 0);
|
||||
FCentralWidget^.set_has_window(True);
|
||||
// PGtkFixed(FCentralWidget)^.set_can_focus(True);
|
||||
end;
|
||||
|
||||
|
@ -1642,6 +1642,11 @@ class procedure TGtk3WSCustomPage.SetBounds(const AWinControl:TWinControl;const
|
||||
begin
|
||||
//do nothing !
|
||||
//inherited SetBounds(AWinControl,ALeft,ATop,AWidth,AHeight);
|
||||
if AWinControl.HandleAllocated then
|
||||
begin
|
||||
TGtk3Page(AWinControl.Handle).LCLWidth := aWidth;
|
||||
TGtk3Page(AWinControl.Handle).LCLWidth := aHeight;
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TGtk3WSCustomPage.SetFont(const AWinControl:TWinControl;const
|
||||
|
Loading…
Reference in New Issue
Block a user