diff options
Diffstat (limited to 'src/qt6gtk2-style/qgtkstyle.cpp')
| -rw-r--r-- | src/qt6gtk2-style/qgtkstyle.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/qt6gtk2-style/qgtkstyle.cpp b/src/qt6gtk2-style/qgtkstyle.cpp index 9bb5b9c..3164e2c 100644 --- a/src/qt6gtk2-style/qgtkstyle.cpp +++ b/src/qt6gtk2-style/qgtkstyle.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2015 The Qt Company Ltd. * - * Copyright (C) 2016-2024 Ilya Kotov, forkotov02@ya.ru * + * Copyright (C) 2016-2025 Ilya Kotov, forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -1806,8 +1806,14 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom // and http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/GtkComboBoxEntry if (const QStyleOptionComboBox *comboBox = qstyleoption_cast<const QStyleOptionComboBox *>(option)) { bool sunken = comboBox->state & State_On; // play dead, if combobox has no items + +#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)) + QCachedPainter p(painter, QStringLiteral("cb-%0-%1").arg(sunken).arg(comboBox->editable), option); + gtkPainter->reset(painter); +#else BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("cb-%0-%1").arg(sunken).arg(comboBox->editable)); gtkPainter->reset(p); +#endif gtkPainter->setUsePixmapCache(false); // cached externally bool isEnabled = (comboBox->state & State_Enabled); @@ -2004,7 +2010,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom style, arrowPath.toString() + QString::number(option->direction)); } } - END_STYLE_PIXMAPCACHE; +#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)) + p.finish(); +#else + END_STYLE_PIXMAPCACHE +#endif } break; #endif // QT_NO_COMBOBOX |
