summaryrefslogtreecommitdiff
path: root/vcl
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-08-20 09:44:40 +0200
commit3da40d1cf37c9ee72f126f5530ee703b87be8cf1 (patch)
treeccd43126eb2b114a8736dffe219f2d5ed9946fd4 /vcl
parent0c92a5a8fd739b3cad0a4213b8c5d8a971633581 (diff)
KDE4: Report correct check and radio item sizes
Use the correct sizs from the current style. Change-Id: I7e163bdc8d467baf2d6e3d0d2bc3e1da7558cf42 (cherry picked from commit c11deb60cabfa8e7ee511b94abb0e19601b42fe6)
Diffstat (limited to 'vcl')
-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 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 )