Kaydet (Commit) ab1f5eab authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

KDE4: Report correct check and radio item sizes

Use the correct sizs from the current style.

Change-Id: I7e163bdc8d467baf2d6e3d0d2bc3e1da7558cf42
üst 380f3b4b
...@@ -837,12 +837,26 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, ...@@ -837,12 +837,26 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
break; break;
} }
case CTRL_MENU_POPUP: 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 int h, w;
contentRect.setWidth(contentRect.height()); 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; retVal = true;
break;
}
if (retVal) {
contentRect = QRect(0, 0, w, h);
boundingRect = contentRect;
} }
break; break;
}
case CTRL_FRAME: case CTRL_FRAME:
{ {
if( part == PART_BORDER ) if( part == PART_BORDER )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment