diff options
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index a1fa6fd280fc..5bad70dc2dbd 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -837,12 +837,26 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, 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 ) |