mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 21:20:30 +02:00
parent
398f6e2e34
commit
2316eaf3f4
@ -87,6 +87,7 @@ var
|
|||||||
Bmp: TBitmap;
|
Bmp: TBitmap;
|
||||||
Icon: QIconH;
|
Icon: QIconH;
|
||||||
B: Boolean;
|
B: Boolean;
|
||||||
|
Size: TSize;
|
||||||
begin
|
begin
|
||||||
ImageList := TCustomTabControl(ACustomPage.Parent).Images;
|
ImageList := TCustomTabControl(ACustomPage.Parent).Images;
|
||||||
|
|
||||||
@ -100,6 +101,13 @@ begin
|
|||||||
Bmp := TBitmap.Create;
|
Bmp := TBitmap.Create;
|
||||||
try
|
try
|
||||||
ImageList.GetBitmap(ACustomPage.ImageIndex, Bmp);
|
ImageList.GetBitmap(ACustomPage.ImageIndex, Bmp);
|
||||||
|
if (TQtPage(ACustomPage.Handle).ChildOfComplexWidget = ccwTabWidget) and
|
||||||
|
(TQtPage(ACustomPage.Handle).getTabWidget <> nil) then
|
||||||
|
begin
|
||||||
|
Size.cx := ImageList.Width;
|
||||||
|
Size.cy := ImageList.Height;
|
||||||
|
QTabWidget_setIconSize(TQtPage(ACustomPage.Handle).getTabWidget, @Size);
|
||||||
|
end;
|
||||||
TQtPage(ACustomPage.Handle).setIcon(TQtImage(Bmp.Handle).AsIcon);
|
TQtPage(ACustomPage.Handle).setIcon(TQtImage(Bmp.Handle).AsIcon);
|
||||||
B := True;
|
B := True;
|
||||||
finally
|
finally
|
||||||
|
Loading…
Reference in New Issue
Block a user