diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 8 | ||||
-rw-r--r-- | src/plugins/styles/android/qandroidstyle.cpp | 77 |
2 files changed, 48 insertions, 37 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 947ac4776c..3bc8590d36 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -221,17 +221,17 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) QVector<int> glVersions; if (m_format.renderableType() == QSurfaceFormat::OpenGL) { - if (requestedVersion > 45) + if (requestedVersion > 46) glVersions << requestedVersion; // Don't bother with versions below 2.0 - glVersions << 45 << 44 << 43 << 42 << 41 << 40 << 33 << 32 << 31 << 30 << 21 << 20; + glVersions << 46 << 45 << 44 << 43 << 42 << 41 << 40 << 33 << 32 << 31 << 30 << 21 << 20; } else if (m_format.renderableType() == QSurfaceFormat::OpenGLES) { - if (requestedVersion > 31) + if (requestedVersion > 32) glVersions << requestedVersion; // Don't bother with versions below ES 2.0 - glVersions << 31 << 30 << 20; + glVersions << 32 << 31 << 30 << 20; // ES does not support any format option m_format.setOptions(QSurfaceFormat::FormatOptions()); } diff --git a/src/plugins/styles/android/qandroidstyle.cpp b/src/plugins/styles/android/qandroidstyle.cpp index ed8c342668..086df92322 100644 --- a/src/plugins/styles/android/qandroidstyle.cpp +++ b/src/plugins/styles/android/qandroidstyle.cpp @@ -331,41 +331,52 @@ void QAndroidStyle::drawControl(QStyle::ControlElement element, : m_androidControlsHash.end(); if (it != m_androidControlsHash.end()) { AndroidControl *androidControl = it.value(); - androidControl->drawControl(opt, p, w); - switch (itemType) { - case QC_Button: - if (const QStyleOptionButton *buttonOption = - qstyleoption_cast<const QStyleOptionButton *>(opt)) { - QMargins padding = androidControl->padding(); - QStyleOptionButton copy(*buttonOption); - copy.rect.adjust(padding.left(), padding.top(), -padding.right(), -padding.bottom()); - QFusionStyle::drawControl(CE_PushButtonLabel, ©, p, w); - } - break; - case QC_Checkbox: - case QC_RadioButton: - if (const QStyleOptionButton *btn = - qstyleoption_cast<const QStyleOptionButton *>(opt)) { - const bool isRadio = (element == CE_RadioButton); - QStyleOptionButton subopt(*btn); - subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents - : SE_CheckBoxContents, btn, w); - QFusionStyle::drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, w); - } - break; - case QC_Combobox: - if (const QStyleOptionComboBox *comboboxOption = - qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { - QMargins padding = androidControl->padding(); - QStyleOptionComboBox copy (*comboboxOption); - copy.rect.adjust(padding.left(), padding.top(), -padding.right(), -padding.bottom()); - QFusionStyle::drawControl(CE_ComboBoxLabel, comboboxOption, p, w); + if (element != QStyle::CE_CheckBoxLabel + && element != QStyle::CE_PushButtonLabel + && element != QStyle::CE_RadioButtonLabel + && element != QStyle::CE_TabBarTabLabel + && element != QStyle::CE_ProgressBarLabel) { + androidControl->drawControl(opt, p, w); + } + + if (element != QStyle::CE_PushButtonBevel + && element != QStyle::CE_TabBarTabShape + && element != QStyle::CE_ProgressBarGroove) { + switch (itemType) { + case QC_Button: + if (const QStyleOptionButton *buttonOption = + qstyleoption_cast<const QStyleOptionButton *>(opt)) { + QMargins padding = androidControl->padding(); + QStyleOptionButton copy(*buttonOption); + copy.rect.adjust(padding.left(), padding.top(), -padding.right(), -padding.bottom()); + QFusionStyle::drawControl(CE_PushButtonLabel, ©, p, w); + } + break; + case QC_Checkbox: + case QC_RadioButton: + if (const QStyleOptionButton *btn = + qstyleoption_cast<const QStyleOptionButton *>(opt)) { + const bool isRadio = (element == CE_RadioButton); + QStyleOptionButton subopt(*btn); + subopt.rect = subElementRect(isRadio ? SE_RadioButtonContents + : SE_CheckBoxContents, btn, w); + QFusionStyle::drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, p, w); + } + break; + case QC_Combobox: + if (const QStyleOptionComboBox *comboboxOption = + qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { + QMargins padding = androidControl->padding(); + QStyleOptionComboBox copy (*comboboxOption); + copy.rect.adjust(padding.left(), padding.top(), -padding.right(), -padding.bottom()); + QFusionStyle::drawControl(CE_ComboBoxLabel, comboboxOption, p, w); + } + break; + default: + QFusionStyle::drawControl(element, opt, p, w); + break; } - break; - default: - QFusionStyle::drawControl(element, opt, p, w); - break; } } else { QFusionStyle::drawControl(element, opt, p, w); |