vcl/unx/kde5/KDE5SalGraphics.cxx | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-)
New commits: commit 45eb2f9ea2347b618c208b4705b5e931d5c8a37b Author: Katarina Behrens <katarina.behr...@cib.de> Date: Tue Apr 24 12:23:58 2018 +0200 Render text edits (single and multiline) natively also drop deprecated QStyleOptionFrameV3 and ancient code for Qt < 4.5 Change-Id: I1f7cf92d23eebc032263b25bdf37651e14994c73 diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx index 7a072938743a..baaaa0fbdbb5 100644 --- a/vcl/unx/kde5/KDE5SalGraphics.cxx +++ b/vcl/unx/kde5/KDE5SalGraphics.cxx @@ -99,9 +99,9 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa return (part == ControlPart::Entire); /*case ControlType::Menubar: - case ControlType::MenuPopup: + case ControlType::MenuPopup:*/ case ControlType::Editbox: - case ControlType::MultilineEditbox:*/ + case ControlType::MultilineEditbox: case ControlType::Combobox: /*case ControlType::Toolbar: case ControlType::Frame: @@ -159,23 +159,10 @@ namespace 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; + QStyleOptionFrame option; option.frameShape = QFrame::StyledPanel; option.state = QStyle::State_Sunken; option.lineWidth = QApplication::style()->pixelMetric( eLineMetric ); - #else - QStyleOptionFrame option; - - QFrame aFrame( nullptr ); - aFrame.setFrameRect( QRect(0, 0, image->width(), image->height()) ); - aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); - aFrame.ensurePolished(); - - option.initFrom( &aFrame ); - option.lineWidth = aFrame.lineWidth(); - option.midLineWidth = aFrame.midLineWidth(); - #endif draw(element, &option, image, state); } } @@ -421,12 +408,12 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part, draw( QStyle::PE_IndicatorToolBarHandle, &option, m_image.get(), vclStateValue2StateFlag(nControlState, value), rect ); - } + }*/ else if (type == ControlType::Editbox || type == ControlType::MultilineEditbox) { lcl_drawFrame( QStyle::PE_FrameLineEdit, m_image.get(), vclStateValue2StateFlag(nControlState, value)); - }*/ + } else if (type == ControlType::Combobox) { QStyleOptionComboBox option; @@ -653,10 +640,10 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part } } break; - /*case ControlType::Editbox: + case ControlType::Editbox: case ControlType::MultilineEditbox: { - QStyleOptionFrameV3 fo; + QStyleOptionFrame fo; fo.frameShape = QFrame::StyledPanel; fo.state = QStyle::State_Sunken; fo.lineWidth = QApplication::style()->pixelMetric(QStyle::PM_DefaultFrameWidth); @@ -676,7 +663,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part } retVal = true; break; - }*/ + } case ControlType::Checkbox: if (part == ControlPart::Entire) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits