From 2316eaf3f46436f4258c7531adbc4a1c862dd1de Mon Sep 17 00:00:00 2001 From: zeljko Date: Wed, 21 Nov 2012 07:43:41 +0000 Subject: [PATCH] Qt: fixed tabwidget icon size. issue #23362 git-svn-id: trunk@39325 - --- lcl/interfaces/qt/qtpagecontrol.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lcl/interfaces/qt/qtpagecontrol.inc b/lcl/interfaces/qt/qtpagecontrol.inc index 87f58a6dcc..cd515c7f37 100644 --- a/lcl/interfaces/qt/qtpagecontrol.inc +++ b/lcl/interfaces/qt/qtpagecontrol.inc @@ -87,6 +87,7 @@ var Bmp: TBitmap; Icon: QIconH; B: Boolean; + Size: TSize; begin ImageList := TCustomTabControl(ACustomPage.Parent).Images; @@ -100,6 +101,13 @@ begin Bmp := TBitmap.Create; try 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); B := True; finally