summaryrefslogtreecommitdiffstats
path: root/src/qt6gtk2-style
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-03-12 23:59:13 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-03-12 23:59:13 -0400
commita9fde3a1a12e9801172e6ff75090f430ad8a8f7b (patch)
tree0ab5d7c392f5d41708a4e00db90efc80415da1fd /src/qt6gtk2-style
parenta52ba004cbbbd7adbe0b30dc8c5c45f5a675187f (diff)
New upstream version 0.4.upstream/0.4
Diffstat (limited to 'src/qt6gtk2-style')
-rw-r--r--src/qt6gtk2-style/plugin.cpp4
-rw-r--r--src/qt6gtk2-style/qgtk2painter.cpp2
-rw-r--r--src/qt6gtk2-style/qgtk2painter_p.h2
-rw-r--r--src/qt6gtk2-style/qgtkglobal_p.h2
-rw-r--r--src/qt6gtk2-style/qgtkpainter.cpp2
-rw-r--r--src/qt6gtk2-style/qgtkpainter_p.h2
-rw-r--r--src/qt6gtk2-style/qgtkstyle.cpp14
-rw-r--r--src/qt6gtk2-style/qgtkstyle_p.cpp4
-rw-r--r--src/qt6gtk2-style/qgtkstyle_p.h2
-rw-r--r--src/qt6gtk2-style/qgtkstyle_p_p.h2
-rw-r--r--src/qt6gtk2-style/qstylehelper.cpp11
-rw-r--r--src/qt6gtk2-style/qstylehelper_p.h2
12 files changed, 34 insertions, 15 deletions
diff --git a/src/qt6gtk2-style/plugin.cpp b/src/qt6gtk2-style/plugin.cpp
index 257d90b..d25aae4 100644
--- a/src/qt6gtk2-style/plugin.cpp
+++ b/src/qt6gtk2-style/plugin.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 *
@@ -42,7 +42,7 @@ QStyle *Qt6Gtk2StylePlugin::create(const QString &key)
return nullptr;
}
- if (key == "gtk2" || key == "qt6gtk2" || key == "qt5gtk2")
+ if (key == QLatin1String("gtk2") || key == QLatin1String("qt6gtk2") || key == QLatin1String("qt5gtk2"))
return new QGtkStyle;
return nullptr;
}
diff --git a/src/qt6gtk2-style/qgtk2painter.cpp b/src/qt6gtk2-style/qgtk2painter.cpp
index 2a80d08..0bb6ca3 100644
--- a/src/qt6gtk2-style/qgtk2painter.cpp
+++ b/src/qt6gtk2-style/qgtk2painter.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 *
diff --git a/src/qt6gtk2-style/qgtk2painter_p.h b/src/qt6gtk2-style/qgtk2painter_p.h
index 59a2fa9..121b7d0 100644
--- a/src/qt6gtk2-style/qgtk2painter_p.h
+++ b/src/qt6gtk2-style/qgtk2painter_p.h
@@ -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 *
diff --git a/src/qt6gtk2-style/qgtkglobal_p.h b/src/qt6gtk2-style/qgtkglobal_p.h
index f0eae9d..a2ce038 100644
--- a/src/qt6gtk2-style/qgtkglobal_p.h
+++ b/src/qt6gtk2-style/qgtkglobal_p.h
@@ -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 *
diff --git a/src/qt6gtk2-style/qgtkpainter.cpp b/src/qt6gtk2-style/qgtkpainter.cpp
index 3f8afad..d8f7dce 100644
--- a/src/qt6gtk2-style/qgtkpainter.cpp
+++ b/src/qt6gtk2-style/qgtkpainter.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 *
diff --git a/src/qt6gtk2-style/qgtkpainter_p.h b/src/qt6gtk2-style/qgtkpainter_p.h
index 4f249af..19b27df 100644
--- a/src/qt6gtk2-style/qgtkpainter_p.h
+++ b/src/qt6gtk2-style/qgtkpainter_p.h
@@ -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 *
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
diff --git a/src/qt6gtk2-style/qgtkstyle_p.cpp b/src/qt6gtk2-style/qgtkstyle_p.cpp
index d8a0597..e85e5ea 100644
--- a/src/qt6gtk2-style/qgtkstyle_p.cpp
+++ b/src/qt6gtk2-style/qgtkstyle_p.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 *
@@ -286,7 +286,7 @@ void QGtkStylePrivate::initGtkWidgets() const
if (!gtkWidgetMap()->contains("GtkButton")) {
GtkWidget *gtkButton = gtk_button_new();
addWidget(gtkButton);
- g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0);
+ g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), nullptr);
addWidget((GtkWidget*)gtk_tool_button_new(nullptr, "Qt"));
addWidget(gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE));
addWidget(gtk_hbutton_box_new());
diff --git a/src/qt6gtk2-style/qgtkstyle_p.h b/src/qt6gtk2-style/qgtkstyle_p.h
index aa7dfa3..cf07f83 100644
--- a/src/qt6gtk2-style/qgtkstyle_p.h
+++ b/src/qt6gtk2-style/qgtkstyle_p.h
@@ -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 *
diff --git a/src/qt6gtk2-style/qgtkstyle_p_p.h b/src/qt6gtk2-style/qgtkstyle_p_p.h
index 5e881ec..0f86c2d 100644
--- a/src/qt6gtk2-style/qgtkstyle_p_p.h
+++ b/src/qt6gtk2-style/qgtkstyle_p_p.h
@@ -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 *
diff --git a/src/qt6gtk2-style/qstylehelper.cpp b/src/qt6gtk2-style/qstylehelper.cpp
index aa88cc7..f652cf7 100644
--- a/src/qt6gtk2-style/qstylehelper.cpp
+++ b/src/qt6gtk2-style/qstylehelper.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 *
@@ -219,7 +219,12 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter)
}
// Cache dial background
+
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0))
+ QCachedPainter p(painter, QLatin1StringView("qdial"), option);
+#else
BEGIN_STYLE_PIXMAPCACHE(QString::fromLatin1("qdial"));
+#endif
p->setRenderHint(QPainter::Antialiasing);
const qreal d_ = r / 6;
@@ -279,7 +284,11 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter)
p->drawEllipse(br.adjusted(-1, -1, 1, 1));
}
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0))
+ p.finish();
+#else
END_STYLE_PIXMAPCACHE
+#endif
QPointF dp = calcRadialPos(option, qreal(0.70));
buttonColor = buttonColor.lighter(104);
diff --git a/src/qt6gtk2-style/qstylehelper_p.h b/src/qt6gtk2-style/qstylehelper_p.h
index 1aedbad..52c7b42 100644
--- a/src/qt6gtk2-style/qstylehelper_p.h
+++ b/src/qt6gtk2-style/qstylehelper_p.h
@@ -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 *