summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-10-08 07:03:28 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2016-12-20 14:19:16 +0100
commitd72f2a5e911cd4162695370fb598036b0a5351d1 (patch)
tree89ecab4d96e76df3a94cc0d217348ae9d13a3fbb
parent0ede250968bee3a64648aa9fd018e25719331366 (diff)
tdf#78924 KDE4 drop special Combobox code
At least not needed with breeze KDE4 theme. Change-Id: I71a05c395d04a6f19c3bcd681450318831b0c29f
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx27
1 files changed, 1 insertions, 26 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 512d2f2356c2..ce26a7e0c4c3 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -757,45 +757,20 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
if( aMinSize.height() > contentRect.height() )
contentRect.adjust( 0, 0, 0, aMinSize.height() - contentRect.height() );
boundingRect = contentRect;
- // FIXME: why this difference between comboboxes and listboxes ?
- // because a combobox has a sub edit and that is positioned
- // inside the outer bordered control ?
- if( type == ControlType::Combobox ) {
- int size = QApplication::style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2;
- contentRect.adjust(-size,-size,size,size);
- }
- else {
- int hmargin = QApplication::style()->pixelMetric(
- QStyle::PM_FocusFrameHMargin, &styleOption);
- int vmargin = QApplication::style()->pixelMetric(
- QStyle::PM_FocusFrameVMargin, &styleOption);
- boundingRect.translate( -hmargin, -vmargin );
- boundingRect.adjust( -hmargin, -vmargin, 2 * hmargin, 2 * vmargin );
- }
retVal = true;
break;
}
case ControlPart::ButtonDown:
contentRect = QApplication::style()->subControlRect(
QStyle::CC_ComboBox, &cbo, QStyle::SC_ComboBoxArrow );
-
contentRect.translate( boundingRect.left(), boundingRect.top() );
-
retVal = true;
break;
case ControlPart::SubEdit:
{
contentRect = QApplication::style()->subControlRect(
QStyle::CC_ComboBox, &cbo, QStyle::SC_ComboBoxEditField );
-
- int hmargin = QApplication::style()->pixelMetric(
- QStyle::PM_FocusFrameHMargin, &styleOption);
- int vmargin = QApplication::style()->pixelMetric(
- QStyle::PM_FocusFrameVMargin, &styleOption);
-
- contentRect.translate( boundingRect.left() + hmargin, boundingRect.top() + vmargin );
- contentRect.adjust( 0, 0, -2 * hmargin, -2 * vmargin );
-
+ contentRect.translate( boundingRect.left(), boundingRect.top() );
retVal = true;
break;
}