summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-02-27 08:51:00 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2014-03-03 10:47:45 +0000
commitab1f5eab4830f00dbbd7c883b98b59975ecd3bb1 (patch)
treee3adb7b5417e67abf3c8f30f351bf04e790ea4ff
parent380f3b4b6cbbe8e82b58ddf55e95c5005307b51f (diff)
KDE4: Report correct check and radio item sizes
Use the correct sizs from the current style. Change-Id: I7e163bdc8d467baf2d6e3d0d2bc3e1da7558cf42
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx20
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 )