From 3da40d1cf37c9ee72f126f5530ee703b87be8cf1 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 27 Feb 2014 08:51:00 +0000 Subject: KDE4: Report correct check and radio item sizes Use the correct sizs from the current style. Change-Id: I7e163bdc8d467baf2d6e3d0d2bc3e1da7558cf42 (cherry picked from commit c11deb60cabfa8e7ee511b94abb0e19601b42fe6) --- vcl/unx/kde4/KDESalGraphics.cxx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index cf72dcd6aca1..fdb8fdd78fe9 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -837,12 +837,26 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p break; } case CTRL_MENU_POPUP: - if (part == PART_MENU_ITEM_CHECK_MARK || part == PART_MENU_ITEM_RADIO_MARK) - { // core uses this to detect radio/checkbox sizes, so just set a square - contentRect.setWidth(contentRect.height()); + { + int h, w; + switch ( part ) { + case PART_MENU_ITEM_CHECK_MARK: + h = kapp->style()->pixelMetric(QStyle::PM_IndicatorHeight); + w = kapp->style()->pixelMetric(QStyle::PM_IndicatorWidth); + retVal = true; + break; + case PART_MENU_ITEM_RADIO_MARK: + h = kapp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorHeight); + w = kapp->style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth); retVal = true; + break; + } + if (retVal) { + contentRect = QRect(0, 0, w, h); + boundingRect = contentRect; } break; + } case CTRL_FRAME: { if( part == PART_BORDER ) -- cgit