[Bug 1162241] New: [Build 20200128] Retracted version is shown in red only if is installed
http://bugzilla.suse.com/show_bug.cgi?id=1162241 Bug ID: 1162241 Summary: [Build 20200128] Retracted version is shown in red only if is installed Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 Assignee: yast2-maintainers@suse.de Reporter: riafarov@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- Created attachment 828674 --> http://bugzilla.suse.com/attachment.cgi?id=828674&action=edit Run with XFCE ## Description On the versions tab, retracted version is not shown in red, unless is already installed. See the screenshots. I've checked that with xfce and gnome. Filing this as a bug, as in trello card this looks different: (https://trello.com/c/lRisXHUt/1556-8-package-selector-improvements-for-sle-8...) Also, it looks as a better warning for the user if red color is used. ## Steps to reproduce 1. Install TW with libyui-qt-pkg11 of verion 2.47.2 or newer 2. Add repo with retracted repo: http://download.opensuse.org/repositories/openSUSE:/Maintenance:/11749/openS... 3. Run software management yast module 4. Search for "hello" package and select it in the list 5. Select Versions tab 6. [RETRACTED] is written with black font Expected result: [RETRACTED] is written in red Please, find screenshots in the attachment. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c1 --- Comment #1 from Rodion Iafarov <riafarov@suse.com> --- Created attachment 828675 --> http://bugzilla.suse.com/attachment.cgi?id=828675&action=edit Run with gnome -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 Marcus Meissner <meissner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c2 Ancor Gonzalez Sosa <ancor@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ancor@suse.com --- Comment #2 from Ancor Gonzalez Sosa <ancor@suse.com> --- Next Monday we will have the review meeting in which we will take a look to the initial implementation of this feature about retracted packages. For the time being, I have linked this bug report from the card, so we can discuss this during the review. Rodion, it would be cool if you can join. After the discussion, I kind of expect a new card follow-up card will be generated to address this issue and more stuff. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 Stefan Hundhammer <shundhammer@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|yast2-maintainers@suse.de |shundhammer@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c3 --- Comment #3 from Stefan Hundhammer <shundhammer@suse.com> --- Created attachment 828938 --> http://bugzilla.suse.com/attachment.cgi?id=828938&action=edit Screenshot: Retracted version exists, but no version of that package is installed -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c4 --- Comment #4 from Stefan Hundhammer <shundhammer@suse.com> --- Created attachment 828939 --> http://bugzilla.suse.com/attachment.cgi?id=828939&action=edit Screenshot: Retracted version exists, but the last good version of that package is installed -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c5 --- Comment #5 from Stefan Hundhammer <shundhammer@suse.com> --- Created attachment 828940 --> http://bugzilla.suse.com/attachment.cgi?id=828940&action=edit Screenshot: Retracted version exists, and that version is installed -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c6 --- Comment #6 from Stefan Hundhammer <shundhammer@suse.com> --- Just to be sure, I rebuilt git master from the libyui-qt-pkg repo and installed it. In my environment, the retracted versions are always both marked as "[RETRACTED]" and highlighted in red. I just the latest TW with Xfce (but the desktop environment should not change this anyway since we always explicitly set that text color to red). I wonder what the difference between your and my setup is. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c7 --- Comment #7 from Stefan Hundhammer <shundhammer@suse.com> --- When I look at the code, I also don't see how it could possibly add the text "[RETRACTED]" but not the red text color: https://github.com/libyui/libyui-qt-pkg/blob/master/src/YQPkgVersionsView.cc... https://github.com/libyui/libyui-qt-pkg/blob/master/src/YQPkgVersionsView.cc... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c8 --- Comment #8 from Stefan Hundhammer <shundhammer@suse.com> --- Argh; it seems like some Qt styles simply ignore a text color that I set for a QRadioButton. I experimented with different Qt styles (set with "qt5ct" on my system), and at least the "Adwaita" and the "Gtk2" widget style ignore the text color for QRadioButtons; they always use their default text color. My default widget style is "Fusion", and with that one it works (see my screenshots); also with most others that I tried: "Cleanlooks", "Motif", "CDE", "Windows". By default, Xfce used "Adwaita" IIRC, and I would expect a "Gtk3" theme for GNOME to behave the same way as the "Gtk2" theme. So if this depends on the widget style, I don't know what we can do about it; if the widget style simply refuses to use the palette that we set, what else can we do? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c9 --- Comment #9 from Stefan Hundhammer <shundhammer@suse.com> --- In "Adwaita" and "Adwaita-dark" the retracted version gets a very narrow dashed outline around the widget if it has the keyboard focus, but the widget does not honor the set palette for the text color. In "Gtk2" it doesn't even do that; it simply ignores the red color. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c10 --- Comment #10 from Stefan Hundhammer <shundhammer@suse.com> --- Those Qt widgetstyles are provided by those packages: % rpm -qf /usr/lib64/qt5/plugins/styles/adwaita.so adwaita-qt5-1.1.0-2.1.x86_64 % rpm -qf /usr/lib64/qt5/plugins/styles/libqgtk2style.so libqt5-qtstyleplugins-platformtheme-gtk2-5.0.0+git20170311-6.14.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 Stefan Hundhammer <shundhammer@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c11 --- Comment #11 from Stefan Hundhammer <shundhammer@suse.com> --- Both those styles seem to be using this code: https://github.com/qt/qtstyleplugins/blob/master/src/plugins/styles/gtk2/qgt... GdkColor gdkText = gtk_widget_get_style(gtkRadioButton)->fg[labelState]; QColor textColor = QColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8); pal.setBrush(QPalette::WindowText, textColor); subopt.palette = pal; proxy()->drawControl(isRadio ? CE_RadioButtonLabel : CE_CheckBoxLabel, &subopt, painter, widget); I.e. the function that draws those widgets in those widget styles simply ignores whatever color the application set before. It just always builds its own color palette. It also uses real Gtk functions to do the actual drawing; it doesn't just emulate it, it uses the real thing. So this just does its own thing regardless of what the calling application wants it to do. Overriding the paint event to set the color before calling this style paint function would also not change anything; it always explicitly uses the default colors. This seems to be intentional by this widget style. IMHO this is still broken, but it's broken intentionally from upstream. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c12 Stefan Hundhammer <shundhammer@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #12 from Stefan Hundhammer <shundhammer@suse.com> --- So, this is broken by design in all Qt widget styles that are based on QGtkStyle. This includes style "gtk2", "Adawaita", "Adawaita-dark". Unfortunately, "gtk2" seems to be the default Qt widget style for our GNOME desktop, and "Adawaita" is the default Qt widget style for our Xfce4 desktop. Our KDE Plasma desktop and probably also our LXDE desktop should not be affected. So I guess we will have to live with black text color for GNOME and Xfce for retracted package versions and just rely on the "[RETRACTED]" label. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c13 Lukas Ocilka <locilka@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(shundhammer@suse. | |com) --- Comment #13 from Lukas Ocilka <locilka@suse.com> --- (In reply to Stefan Hundhammer from comment #12)
Unfortunately, "gtk2" seems to be the default Qt widget style for our GNOME desktop, and "Adawaita" is the default Qt widget style for our Xfce4 desktop.
But GNOME is the default. So, what about fixing / changing the style? Obviously it doesn't need to be done by us. Possible? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c14 --- Comment #14 from Lukas Ocilka <locilka@suse.com> --- Here https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/Adwaita ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1162241 http://bugzilla.suse.com/show_bug.cgi?id=1162241#c15 Stefan Hundhammer <shundhammer@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(shundhammer@suse. | |com) | --- Comment #15 from Stefan Hundhammer <shundhammer@suse.com> --- (In reply to Lukas Ocilka from comment #13)
But GNOME is the default. So, what about fixing / changing the style? Obviously it doesn't need to be done by us. Possible?
I quoted the relevant code in comment #11 (including the link to the upstream repo). To me this looks like all color handling for this is done in the Gtk classes; no idea what would happen if this all of a sudden would use the QWidget::palette(). AFAIK Gtk themes use a whole lot of auxiliary files for things like colors; would this integrate with just using the QWidget::palette()? Or would single widgets just stick out like a sore thumb? I don't know. AFAICS we simply use the upstream code verbatim without any patch, and the change log shows exclusively openSUSE community members. https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtstyleplugi... https://build.opensuse.org/package/view_file/openSUSE:Factory/libqt5-qtstyle... To me this looks like we don't have that much in-house expertise, probably in particular not with the grey area where Qt meets Gtk. Is it possible to hammer it into shape? Probably; after all, it's just software. Will it break stuff? Very likely. Is it worth it? I don't think so. This is about optimizing a pathological case that will hopefully never happen. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com