FedoraQt / adwaita-qt

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

Lighter (disabled?) text drawn for unfocused views. #126

Closed CDrummond closed 1 year ago

CDrummond commented 4 years ago

As can be seen in the following kid3-qt screenshot, a ligher grey text is used to draw views that currently don't have focus. This looks odd, and (espcially in kd3-qt's case) makes the app harder to use.

kid3-text

The vie won th eleft also does not have focus, so not sure exactly what is going on. But, if the table-view within the right had side vide gets focus, then its text turns black.

grulja commented 4 years ago

I pushed https://github.com/FedoraQt/adwaita-qt/commit/e671e8e88d90332d65e3f8396bb98393fc50bafe, which fixes it for QTreeView, but I was unable to find a solution for QTableView and QListView. They seem to be rendered differently and I already spent hours trying to find a solution. I will keep this opened, but I have no idea at this moment how to fix it.

uklotzde commented 4 years ago

Mixxx also seems to be affected by the latest changes in 1.1.2 (crashes) and 1.1.3. Both QTreeView and QTableView are affected depending on focus:

adwaita-qt5-1.1.1: palette_before

adwaita-qt5-1.1.3: palette_after

Version 1.1.1 worked for us, version 1.1.2/1.1.3 is unusable right now.

uklotzde commented 4 years ago

Colors in QTreeView and QTableViw are now changing from inactive to active in unforeseeable ways depending on the focus. Maybe caused by the recent commits during Apr 2020 targeting unfocused views?

grulja commented 4 years ago

The reason why I did it this way is that Qt doesn't distinguish between inactive widget and inactive window. For example you could have a tree view in your app, the app had focus on a different widget and the tree view was grey, looking like the whole application not having focus. To fix that, I just check whether the main window has focus and set inactive palette to have colors from the active one.

Why Mixxx use grey color for text when it's active?

uklotzde commented 4 years ago

The screenshots were taken with Mixxx in fullscreen mode. I need to check whether switching the window modes affects the behavior.

Maybe @ronso0 could provide some insights how the focus handling between different views in Mixxx works.

grulja commented 4 years ago

Ok, I think I know why this is happening. You probably set some custom color to the view and we change it back to Adwaita default palette when the window looses focus. I will fix it during the weekend.

grulja commented 4 years ago

Can you try https://github.com/FedoraQt/adwaita-qt/commit/e5dfd0be75b31dc3b823de0c4bd320b9a6995b89 for the Mixxx issue?

uklotzde commented 4 years ago

Great! Works as expected in all modes (fullscreen/window). The color scheme is now preserved after activating the menu bar.

@Be-ing @ronso0 Tested with both Deere and Tango on master.

Be-ing commented 4 years ago

That works, but I can only get the theme to apply to Qt applications when I run them from KDE... now my fonts are all tiny after changing something in KDE system settings... even erasing ~/.config didn't fix it :cry:

grulja commented 4 years ago

That works, but I can only get the theme to apply to Qt applications when I run them from KDE... now my fonts are all tiny after changing something in KDE system settings... even erasing ~/.config didn't fix it

You can force the theme with QT_STYLE_OVERRIDE=adwaita.

No idea why your fonts are tiny, this is unfortunately not related to Adwaita at all.

Awem commented 4 years ago

On adwaita-qt 1.1.4 KeePassXC still looks like this: image Is there some way to fix this?

This is how it looks on 1.1.1: image

grulja commented 4 years ago

On adwaita-qt 1.1.4 KeePassXC still looks like this: image Is there some way to fix this?

This is how it looks on 1.1.1: image

Can you be more specific about the area where you see this? Maybe a whole screenshot? Running it myself I don't have any problem with it.

Awem commented 4 years ago

Ah, okay. Maybe this helps:

  1. create a new entry with any title
  2. choose "clone entry" on the context menu of that new entry
  3. make sure the second checkbox concerning the references is checked
Awem commented 4 years ago

@grulja the light text is no longer an issue with KeePassXC 2.6.0

polter-rnd commented 1 year ago

Fixed in https://github.com/FedoraQt/adwaita-qt/pull/183