diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-10-09 16:34:54 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-12-20 14:19:17 +0100 |
commit | 7ab2350d55ac6c222ae218435f7d56e59be3add5 (patch) | |
tree | 63a3f1a87af183ce5efacab1f077c574bfabe27b /vcl | |
parent | b82f4373f55ac814e40fe3040d44dfe261f11ac5 (diff) |
KDE4 use correct ComboBox frame pixel metric
Change-Id: I03fa5489ffc5cd5bb386bb321519c61058db4fda
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde4/KDESalGraphics.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 0659e14b92c4..565eadfe0daa 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -142,16 +142,18 @@ namespace QApplication::style()->drawComplexControl(element, option, &painter); } - void lcl_drawFrame(QStyle::PrimitiveElement element, QImage* image, QStyle::State const & state) + void lcl_drawFrame( QStyle::PrimitiveElement element, QImage* image, QStyle::State const & state, + QStyle::PixelMetric eLineMetric = QStyle::PM_DefaultFrameWidth ) { #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) ) QStyleOptionFrameV3 option; option.frameShape = QFrame::StyledPanel; option.state = QStyle::State_Sunken; + option.lineWidth = QApplication::style()->pixelMetric( eLineMetric ); #else QStyleOptionFrame option; - QFrame aFrame( NULL ); + QFrame aFrame( nullptr ); aFrame.setFrameRect( QRect(0, 0, image->width(), image->height()) ); aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); aFrame.ensurePolished(); @@ -160,7 +162,6 @@ namespace option.lineWidth = aFrame.lineWidth(); option.midLineWidth = aFrame.midLineWidth(); #endif - draw(element, &option, image, state); } } @@ -422,10 +423,12 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, else if (type == ControlType::Listbox) { QStyleOptionComboBox option; + option.editable = false; switch (part) { case ControlPart::ListboxWindow: lcl_drawFrame( QStyle::PE_Frame, m_image.get(), - vclStateValue2StateFlag(nControlState, value) ); + vclStateValue2StateFlag(nControlState, value), + QStyle::PM_ComboBoxFrameWidth ); break; case ControlPart::SubEdit: draw( QStyle::CE_ComboBoxLabel, &option, m_image.get(), @@ -773,9 +776,6 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, retVal = true; break; } - case ControlPart::ListboxWindow: - retVal = true; - break; default: break; } |