mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 18:09:32 +02:00
Qt5, Qt6: allow background color of TTabSheet just like in win32,gtk2 and gtk3. Fixed setting font of TTabSheet.
This commit is contained in:
parent
3a75d77348
commit
bfc45a589a
@ -88,7 +88,8 @@ class procedure TQtWSCustomPage.SetFont(const AWinControl: TWinControl;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetFont') then
|
||||
Exit;
|
||||
inherited SetFont(AWinControl, AFont);
|
||||
TQtWSWinControl.SetFont(AWinControl, AFont);
|
||||
|
||||
UpdateTabFontColor(TCustomPage(AWinControl), AFont);
|
||||
end;
|
||||
|
||||
|
@ -1920,6 +1920,7 @@ type
|
||||
FIcon: QIconH;
|
||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||
public
|
||||
function CanPaintBackground: Boolean; override;
|
||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
||||
function getIcon: QIconH;
|
||||
function getIndex(const ATextChanging: Boolean = False): Integer;
|
||||
@ -18803,6 +18804,11 @@ begin
|
||||
Result := QWidget_create(Parent);
|
||||
end;
|
||||
|
||||
function TQtPage.CanPaintBackground: Boolean;
|
||||
begin
|
||||
Result := CanSendLCLMessage and (LCLObject.Color <> clDefault);
|
||||
end;
|
||||
|
||||
function TQtPage.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
|
||||
var
|
||||
ASize: TSize;
|
||||
|
@ -31,7 +31,7 @@ uses
|
||||
ComCtrls, Controls, LCLType, Graphics, StdCtrls,
|
||||
LCLIntf, Forms, ImgList,
|
||||
// Widgetset
|
||||
WSProc, WSComCtrls, WSLCLClasses;
|
||||
WSProc, WSComCtrls, WSLCLClasses, QtWSControls;
|
||||
|
||||
type
|
||||
{ TQtWSCustomPage }
|
||||
|
@ -88,7 +88,8 @@ class procedure TQtWSCustomPage.SetFont(const AWinControl: TWinControl;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetFont') then
|
||||
Exit;
|
||||
inherited SetFont(AWinControl, AFont);
|
||||
TQtWSWinControl.SetFont(AWinControl, AFont);
|
||||
|
||||
UpdateTabFontColor(TCustomPage(AWinControl), AFont);
|
||||
end;
|
||||
|
||||
|
@ -1920,6 +1920,7 @@ type
|
||||
FIcon: QIconH;
|
||||
function CreateWidget(const AParams: TCreateParams):QWidgetH; override;
|
||||
public
|
||||
function CanPaintBackground: Boolean; override;
|
||||
function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl; override;
|
||||
function getIcon: QIconH;
|
||||
function getIndex(const ATextChanging: Boolean = False): Integer;
|
||||
@ -18720,6 +18721,11 @@ begin
|
||||
Result := QWidget_create(Parent);
|
||||
end;
|
||||
|
||||
function TQtPage.CanPaintBackground: Boolean;
|
||||
begin
|
||||
Result := CanSendLCLMessage and (LCLObject.Color <> clDefault);
|
||||
end;
|
||||
|
||||
function TQtPage.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
|
||||
var
|
||||
ASize: TSize;
|
||||
|
@ -29,7 +29,7 @@ uses
|
||||
SysUtils, Classes, Types, ComCtrls, Controls, LCLType, Graphics, StdCtrls,
|
||||
LCLIntf, Forms, ImgList,
|
||||
// Widgetset
|
||||
WSProc, WSComCtrls, WSLCLClasses;
|
||||
WSProc, WSComCtrls, WSLCLClasses, QtWSControls;
|
||||
|
||||
type
|
||||
{ TQtWSCustomPage }
|
||||
|
Loading…
Reference in New Issue
Block a user