[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 3 commits - vcl/unx
Katarina Behrens
Katarina.Behrens at cib.de
Mon Apr 23 13:29:32 UTC 2018
vcl/unx/kde5/KDE5SalGraphics.cxx | 40 +++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
New commits:
commit 3aa593fe271451f7b8cbc4ac8fca9f436b6c7aca
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Apr 23 15:14:22 2018 +0200
Render listboxes and comboboxes natively
Change-Id: Ia8d46717df43b088bb72d1f937998a64795f663e
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index e686565b46f2..7a072938743a 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -101,19 +101,19 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa
/*case ControlType::Menubar:
case ControlType::MenuPopup:
case ControlType::Editbox:
- case ControlType::MultilineEditbox:
+ case ControlType::MultilineEditbox:*/
case ControlType::Combobox:
- case ControlType::Toolbar:
+ /*case ControlType::Toolbar:
case ControlType::Frame:
case ControlType::Scrollbar:
case ControlType::WindowBackground:
- case ControlType::Fixedline:
+ case ControlType::Fixedline:*/
return true;
case ControlType::Listbox:
return (part == ControlPart::Entire || part == ControlPart::HasBackgroundTexture);
- case ControlType::Spinbox:
+ /*case ControlType::Spinbox:
return (part == ControlPart::Entire || part == ControlPart::HasBackgroundTexture);
case ControlType::Slider:
@@ -426,7 +426,7 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
{
lcl_drawFrame( QStyle::PE_FrameLineEdit, m_image.get(),
vclStateValue2StateFlag(nControlState, value));
- }
+ }*/
else if (type == ControlType::Combobox)
{
QStyleOptionComboBox option;
@@ -462,7 +462,7 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
break;
}
}
- else if (type == ControlType::ListNode)
+ /*else if (type == ControlType::ListNode)
{
QStyleOption option;
option.state = QStyle::State_Item | QStyle::State_Children;
@@ -699,7 +699,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
retVal = true;
}
break;
- /*case ControlType::Combobox:
+ case ControlType::Combobox:
case ControlType::Listbox:
{
QStyleOptionComboBox cbo;
@@ -712,7 +712,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
case ControlPart::Entire:
{
// find out the minimum size that should be used
- // assume contents is a text ling
+ // assume contents is a text line
int nHeight = QApplication::fontMetrics().height();
QSize aContentSize( contentRect.width(), nHeight );
QSize aMinSize = QApplication::style()->
@@ -742,7 +742,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
}
break;
}
- case ControlType::Spinbox:
+ /*case ControlType::Spinbox:
{
QStyleOptionSpinBox sbo;
sbo.frame = true;
commit 358cf52e21d9744d8dde324eb180fccf72c85377
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Apr 23 14:39:42 2018 +0200
Render pushbuttons natively
Change-Id: I1a8e82d70841765cad3d5838877489aab4656678
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 1556eac7c694..e686565b46f2 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -90,7 +90,7 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa
{
switch (type)
{
- /*case ControlType::Pushbutton:*/
+ case ControlType::Pushbutton:
case ControlType::Radiobutton:
case ControlType::Checkbox:
/*case ControlType::Tooltip:
@@ -274,13 +274,13 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
QRegion* localClipRegion = nullptr;
- /*if (type == ControlType::Pushbutton)
+ if (type == ControlType::Pushbutton)
{
QStyleOptionButton option;
draw( QStyle::CE_PushButton, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value) );
}
- else if (type == ControlType::Menubar)
+ /*else if (type == ControlType::Menubar)
{
if (part == ControlPart::MenuItem)
{
@@ -473,7 +473,7 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
draw( QStyle::PE_IndicatorBranch, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value) );
}*/
- if (type == ControlType::Checkbox)
+ else if (type == ControlType::Checkbox)
{
QStyleOptionButton option;
draw( QStyle::CE_CheckBox, &option, m_image.get(),
@@ -638,7 +638,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
switch ( type )
{
- /*// Metrics of the push button
+ // Metrics of the push button
case ControlType::Pushbutton:
if (part == ControlPart::Entire)
{
@@ -653,7 +653,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
}
}
break;
- case ControlType::Editbox:
+ /*case ControlType::Editbox:
case ControlType::MultilineEditbox:
{
QStyleOptionFrameV3 fo;
commit 3f475b0195ccfb26eff50f72a1aac5fd35c1192c
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Apr 23 14:34:39 2018 +0200
Render radiobuttons natively
Change-Id: Idcc0563ec6fc788c1af135a7389a740e31e999c3
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index e8076ebb18f9..1556eac7c694 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -90,8 +90,8 @@ bool KDE5SalGraphics::IsNativeControlSupported( ControlType type, ControlPart pa
{
switch (type)
{
- /*case ControlType::Pushbutton:
- case ControlType::Radiobutton:*/
+ /*case ControlType::Pushbutton:*/
+ case ControlType::Radiobutton:
case ControlType::Checkbox:
/*case ControlType::Tooltip:
case ControlType::Progress:
@@ -544,14 +544,14 @@ bool KDE5SalGraphics::drawNativeControl( ControlType type, ControlPart part,
draw( QStyle::CC_SpinBox, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value) );
- }
+ }*/
else if (type == ControlType::Radiobutton)
{
QStyleOptionButton option;
draw( QStyle::CE_RadioButton, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value) );
}
- else if (type == ControlType::Tooltip)
+ /*else if (type == ControlType::Tooltip)
{
QStyleOption option;
draw( QStyle::PE_PanelTipLabel, &option, m_image.get(),
@@ -828,7 +828,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
retVal = true;
}
break;
- }
+ }*/
case ControlType::Radiobutton:
{
const int h = QApplication::style()->pixelMetric(QStyle::PM_ExclusiveIndicatorHeight);
@@ -846,7 +846,7 @@ bool KDE5SalGraphics::getNativeControlRegion( ControlType type, ControlPart part
retVal = true;
break;
}
- case ControlType::Slider:
+ /* case ControlType::Slider:
{
const int w = QApplication::style()->pixelMetric(QStyle::PM_SliderLength);
if( part == ControlPart::ThumbHorz )
More information about the Libreoffice-commits
mailing list