From fdb3d33075834f0ccb550ea537040ac2466f4fac Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sun, 27 Jul 2025 01:13:11 -0400 Subject: New upstream version 0.5. --- ChangeLog | 4 +++- README.md | 8 ++++---- src/qt6gtk2-style/qgtkstyle.cpp | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f2f6c2..a7c4d1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,9 @@ Changelog of Qt6Gtk2 - ---------- +Version 0.5 +* Fixed placeholder text color + Version 0.4 * Added Qt 6.9 support * Moved home page to opencode.net diff --git a/README.md b/README.md index 87022cd..74c5325 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ the following line: Now restart X11 server to take the changes effect. Files and directories: - -`libqt6gtk2.so` - GTK+2.0 platform plugin -`libqt6gtk2-style.so` - GTK+2.0 style plugin - +``` +libqt6gtk2.so - GTK+2.0 platform plugin +libqt6gtk2-style.so - GTK+2.0 style plugin +``` Attention! Environment variable `QT_STYLE_OVERRIDE` should be removed before usage. diff --git a/src/qt6gtk2-style/qgtkstyle.cpp b/src/qt6gtk2-style/qgtkstyle.cpp index 3164e2c..32a4a74 100644 --- a/src/qt6gtk2-style/qgtkstyle.cpp +++ b/src/qt6gtk2-style/qgtkstyle.cpp @@ -327,7 +327,7 @@ QPalette QGtkStyle::standardPalette() const GtkWidget *gtkButton = d->gtkWidget("GtkButton"); GtkWidget *gtkEntry = d->getTextColorWidget(); GdkColor gdkBg, gdkBase, gdkText, gdkForeground, gdkSbg, gdkSfg, gdkaSbg, gdkaSfg; - QColor bg, base, text, fg, highlight, highlightText, inactiveHighlight, inactiveHighlightedTExt; + QColor bg, base, text, plText, fg, highlight, highlightText, inactiveHighlight, inactiveHighlightedTExt; gdkBg = style->bg[GTK_STATE_NORMAL]; gdkForeground = gtk_widget_get_style(gtkButton)->fg[GTK_STATE_NORMAL]; @@ -345,6 +345,7 @@ QPalette QGtkStyle::standardPalette() const bg = QColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8); text = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); + plText = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8, 128); fg = QColor(gdkForeground.red>>8, gdkForeground.green>>8, gdkForeground.blue>>8); base = QColor(gdkBase.red>>8, gdkBase.green>>8, gdkBase.blue>>8); highlight = QColor(gdkSbg.red>>8, gdkSbg.green>>8, gdkSbg.blue>>8); @@ -362,6 +363,7 @@ QPalette QGtkStyle::standardPalette() const palette.setColor(QPalette::WindowText, fg); palette.setColor(QPalette::ButtonText, fg); palette.setColor(QPalette::Base, base); + palette.setColor(QPalette::PlaceholderText, plText); QColor alternateRowColor = palette.base().color().lighter(93); // ref gtkstyle.c draw_flat_box GtkWidget *gtkTreeView = d->gtkWidget("GtkTreeView"); -- cgit v1.2.3