vcl/unx/kde4/KDESalGraphics.cxx | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-)
New commits: commit 310ed685c25b9631a075d728c380a9a9add21376 Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Wed Jul 8 14:56:24 2015 +0000 test Change-Id: Ia5b6cd25d1027569887fcacebcbd3db47eccd999 diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index cc320ae..282fdb6 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -109,6 +109,7 @@ bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par case CTRL_LISTBOX: return (part == PART_ENTIRE_CONTROL + || part == PART_BUTTON_DOWN || part == PART_SUB_EDIT); case CTRL_SPINBOX: @@ -247,7 +248,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, widgetRect.height(), QImage::Format_ARGB32 ); } - m_image->fill(KApplication::palette().color(QPalette::Window).rgb()); + m_image->fill( Qt::transparent ); QRegion* clipRegion = NULL; @@ -260,6 +261,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, } else if (type == CTRL_MENUBAR) { + m_image->fill( KApplication::palette().color(QPalette::Window).rgb()); if (part == PART_MENU_ITEM) { QStyleOptionMenuItem option; @@ -286,6 +288,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, } else if (type == CTRL_MENU_POPUP) { + m_image->fill( KApplication::palette().color(QPalette::Window).rgb()); OSL_ASSERT( part == PART_MENU_ITEM ? lastPopupRect.isValid() : !lastPopupRect.isValid()); if( part == PART_MENU_ITEM ) { @@ -408,24 +411,22 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, } else if (type == CTRL_LISTBOX) { - if( part == PART_WINDOW ) - { - lcl_drawFrame( QStyle::PE_Frame, m_image, - vclStateValue2StateFlag(nControlState, value) ); - } - else - { - QStyleOptionComboBox option; - if (part == PART_SUB_EDIT) - { + QStyleOptionComboBox option; + switch (part) { + case PART_SUB_EDIT: draw( QStyle::CE_ComboBoxLabel, &option, m_image, vclStateValue2StateFlag(nControlState, value) ); - } - else - { + break; + case PART_ENTIRE_CONTROL: draw( QStyle::CC_ComboBox, &option, m_image, vclStateValue2StateFlag(nControlState, value) ); - } + break; + case PART_BUTTON_DOWN: + m_image->fill( Qt::transparent ); + option.subControls = QStyle::SC_ComboBoxArrow; + draw( QStyle::CC_ComboBox, &option, m_image, + vclStateValue2StateFlag(nControlState, value) ); + break; } } else if (type == CTRL_LISTNODE) @@ -745,10 +746,10 @@ bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, // 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 == CTRL_COMBOBOX ) { +// if( type == CTRL_COMBOBOX ) { int size = QApplication::style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2; - contentRect.adjust(-size,-size,size,size); - } + contentRect.adjust(0, 0, 2 * size, 2 * size); +// } retVal = true; break; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits