FedoraQt / adwaita-qt

A style to bend Qt applications to look like they belong into GNOME Shell
Other
488 stars 48 forks source link

Set icons are shown on menus/buttons #137

Closed jurplel closed 4 years ago

jurplel commented 4 years ago

I am writing this program: https://github.com/jurplel/qView

On Gnome with Adwaita-Qt, menus show icons, even though they should not afaik. Screenshot from 2020-05-18 12-38-03

I don't know if this is related, but when setting an explicit icon for a pushbutton, it also appears (Default buttonbox buttons do not show an icon).

auto *downloadButton = new QPushButton(QIcon::fromTheme("edit-download", QIcon::fromTheme("document-save")), tr("Download"));

Screenshot from 2020-05-18 12-39-08

grulja commented 4 years ago

Icons in menus were allowed with https://github.com/FedoraQt/adwaita-qt/commit/f91b110b0888d292766de92842f10aae6b745b25. Some applications really need the icons to be shown and I don't think it's a big issue for Adwaita-qt to show them.

Not sure about icons in buttons, those should be probably disabled to be consistent with GNOME. On the other hand I believe it visually helps.

jurplel commented 4 years ago

I was under the assumption that icons should be hided from the menu as in GTK programs, but I see how you have come to this decision. You are free to close the issue.

grulja commented 4 years ago

If you want to hide the icons in your app you can set Qt::AA_DontShowIconsInMenus attribute to your app.

jurplel commented 4 years ago

Trouble is, I don't want to disable icons in menus for styles that use them by default (Like KDE Breeze).