mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 05:40:24 +02:00
LCL: fix TabControl spacing / qt
git-svn-id: trunk@42567 -
This commit is contained in:
parent
1b9ad85931
commit
7b1de06cbb
@ -276,6 +276,42 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TQtWSCustomTabControl.GetNotebookMinTabHeight(
|
||||
const AWinControl: TWinControl): integer;
|
||||
var
|
||||
dy: integer;
|
||||
ATabWidget: TQtTabWidget;
|
||||
begin
|
||||
if AWinControl.HandleAllocated and
|
||||
(TQtWidget(AWinControl.Handle).ChildOfComplexWidget <> ccwTTabControl)
|
||||
then begin
|
||||
ATabWidget := TQtTabWidget(AWinControl.Handle);
|
||||
Result := 0;
|
||||
ATabWidget.TabBar.preferredSize(dy, Result, False);
|
||||
if Result > 0 then
|
||||
exit;
|
||||
end;
|
||||
Result:=inherited GetNotebookMinTabHeight(AWinControl);
|
||||
end;
|
||||
|
||||
class function TQtWSCustomTabControl.GetNotebookMinTabWidth(
|
||||
const AWinControl: TWinControl): integer;
|
||||
var
|
||||
dy: integer;
|
||||
ATabWidget: TQtTabWidget;
|
||||
begin
|
||||
if AWinControl.HandleAllocated and
|
||||
(TQtWidget(AWinControl.Handle).ChildOfComplexWidget <> ccwTTabControl)
|
||||
then begin
|
||||
ATabWidget := TQtTabWidget(AWinControl.Handle);
|
||||
Result := 0;
|
||||
ATabWidget.TabBar.preferredSize(Result, dy, False);
|
||||
if Result > 0 then
|
||||
exit;
|
||||
end;
|
||||
Result:=inherited GetNotebookMinTabWidth(AWinControl);
|
||||
end;
|
||||
|
||||
class function TQtWSCustomTabControl.GetCapabilities: TCTabControlCapabilities;
|
||||
begin
|
||||
Result := [nbcShowCloseButtons];
|
||||
|
@ -61,6 +61,10 @@ type
|
||||
class procedure RemovePage(const ATabControl: TCustomTabControl;
|
||||
const AIndex: integer); override;
|
||||
|
||||
class function GetNotebookMinTabHeight(const AWinControl: TWinControl
|
||||
): integer; override;
|
||||
class function GetNotebookMinTabWidth(const AWinControl: TWinControl
|
||||
): integer; override;
|
||||
class function GetCapabilities: TCTabControlCapabilities; override;
|
||||
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
|
||||
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; override;
|
||||
|
Loading…
Reference in New Issue
Block a user