mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 13:00:17 +02:00
* Fixed TStatusBar regressions under linux (not visible) introduced by latest patches.
git-svn-id: trunk@11583 -
This commit is contained in:
parent
55f077b595
commit
a963094291
@ -54,6 +54,7 @@ type
|
||||
class procedure Update(const AStatusBar: TStatusBar); override;
|
||||
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean); override;
|
||||
class procedure AddControl(const AControl: TControl); override;
|
||||
end;
|
||||
|
||||
{ TQtWSTabSheet }
|
||||
@ -528,15 +529,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{some systems doesn't show statusbar inside mainwindow
|
||||
(linux tested on FC3,FC4,FC7 ).}
|
||||
{$ifdef linux}
|
||||
if Assigned(AWinControl.Parent)
|
||||
and (AWinControl.Parent.Handle = Application.MainForm.Handle)
|
||||
then
|
||||
QMainWindow_setStatusBar(QMainWindowH(TQtMainWindow(AWinControl.Parent.Handle).Widget), QStatusBarH(QtStatusBar.Widget));
|
||||
{$endif}
|
||||
|
||||
// Return handle
|
||||
|
||||
Result := THandle(QtStatusBar);
|
||||
@ -707,6 +699,25 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
class procedure TQtWSStatusBar.AddControl(const AControl: TControl);
|
||||
var
|
||||
QtStatusBar: TQtStatusBar;
|
||||
begin
|
||||
inherited AddControl(AControl);
|
||||
|
||||
{some systems doesn't show statusbar inside mainwindow
|
||||
(linux tested on FC3,FC4,FC7,Ubuntu 7.04 ).}
|
||||
{$ifdef linux}
|
||||
if Assigned(AControl.Parent)
|
||||
and (AControl.Parent.Handle = Application.MainForm.Handle)
|
||||
then
|
||||
begin
|
||||
QtStatusBar := TQtStatusBar(TWinControl(AControl).Handle);
|
||||
QMainWindow_setStatusBar(QMainWindowH(TQtMainWindow(AControl.Parent.Handle).Widget), QStatusBarH(QtStatusBar.Widget));
|
||||
end;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
{ TQtWSCustomListView }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user