From 805a4e6542bcee0c023d77681b24e1a75d288760 Mon Sep 17 00:00:00 2001 From: zeljko Date: Mon, 5 May 2014 14:19:21 +0000 Subject: [PATCH] Qt: fixed crash if stylesheet is used. git-svn-id: trunk@44927 - --- lcl/interfaces/qt/qtpagecontrol.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lcl/interfaces/qt/qtpagecontrol.inc b/lcl/interfaces/qt/qtpagecontrol.inc index c92743a61c..5cbe113a2f 100644 --- a/lcl/interfaces/qt/qtpagecontrol.inc +++ b/lcl/interfaces/qt/qtpagecontrol.inc @@ -201,13 +201,13 @@ begin // we must recalculate aclientrect since we have pending resize event // and clientrect won't be accurate.issue #21805 Result := True; - dx := GetPixelMetric(QStylePM_DefaultFrameWidth, nil, nil); + dx := GetPixelMetric(QStylePM_DefaultFrameWidth, nil, ATabWidget.Widget); // HSpace := GetPixelMetric(QStylePM_TabBarTabHSpace, nil, nil); - VSpace := GetPixelMetric(QStylePM_TabBarTabVSpace, nil, nil); - Overlap := GetPixelMetric(QStylePM_TabBarBaseOverlap, nil, nil); - TabOverLap := GetPixelMetric(QStylePM_TabBarTabOverlap, nil, nil); - BaseHeight := GetPixelMetric(QStylePM_TabBarBaseHeight, nil, nil); - ShiftVertical := GetPixelMetric(QStylePM_TabBarTabShiftVertical, nil, nil); + VSpace := GetPixelMetric(QStylePM_TabBarTabVSpace, nil, ATabWidget.Widget); + Overlap := GetPixelMetric(QStylePM_TabBarBaseOverlap, nil, ATabWidget.Widget); + TabOverLap := GetPixelMetric(QStylePM_TabBarTabOverlap, nil, ATabWidget.Widget); + BaseHeight := GetPixelMetric(QStylePM_TabBarBaseHeight, nil, ATabWidget.Widget); + ShiftVertical := GetPixelMetric(QStylePM_TabBarTabShiftVertical, nil, ATabWidget.Widget); // trigger sizing, do not remove ATabWidget.TabBar.sizeHint(@ASize);