Open florisvdh opened 1 year ago
As a workaround until we can figure this out you can change the 'style' selector in the qt5 configuration tool to use a neutral color theme. (maybe you know this already)
Thanks
OK thanks, the workaround works! (I wasn't aware of it)
Thought I was going crazy, but then I found this issue report. The problem also affects selected items in Qt list views and tree views by the way. This seems to happen in all Qt5 applications when set to use the GTK style. A work-around I've found for list and tree views is to make and apply a QSS style sheet in qt5ct that matches your current theme (one can use Gpick or a similar tool to quickly get the RGB value for selected items). This is mine right now:
QTreeView::item:selected
{
background: rgb(146, 179, 114);
}
I have yet to figure out a work-around which matches up nicely with GTK for the text highlighting issue, but this makes the bug less noticeable.
Just updating for anyone interested, but I was able to mash together a more comprehensive fix that matches the theme I'm currently using with Cinnamon. Some Qt5 applications still exhibit the issue, but a good number are fixed and it's a lot more tolerable now. Remember that you must replace the colors in the QSS stylesheet with one that matches your theme. Anyway, the following has helped me out a lot:
QTreeView::item:selected
{
background: rgb(146, 179, 114);
}
QListView::item:selected
{
background: rgb(146, 179, 114);
}
QLineEdit
{
selection-background-color: #92B372;
}
QTextEdit
{
selection-background-color: #92B372;
}
QTableView
{
selection-background-color: #92B372;
}
Issue
In some Qt applications, e.g. QGit and QGIS, line selections in one panel become white (hence not readable) when focus is brought to another panel (in the same application window). I could easily reproduce this in a live session of Mint 21.1, see below.
Steps to reproduce
Below can be reproduced in a live session of Mint 21.1, taking QGit as an example, but I expect other Qt applications with multiple interdependent panels to suffer too (confirmed for QGIS).
apt install qgit
Repeating the same for another line:
Expected behaviour
Selected text and the selection background should never disappear when a panel looses its focus.
Other information
The issue did not exist in Linux Mint 20 and before, it appeared since I freshly installed Linux Mint 21.