Open fulalas opened 2 years ago
Is this https://github.com/FedoraQt/adwaita-qt/issues/126 the same issue?
It seems to be the same issue, but I don't get it. The change is already in 1.4.1 and I'm still seeing the issue.
OK, comparing 1.1.1 with 1.1.2 I managed to find the code responsible for part of the issue. In adwaitasyle.cpp you should change to this:
bool Style::drawItemViewItemControl(const QStyleOption *option, QPainter *painter, const QWidget *widget) const
{
const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option);
if (!vopt) {
return true;
}
QStyleOptionViewItem op(*vopt);
QPalette palette = op.palette;
if ((vopt->state & QStyle::State_Enabled) && !(vopt->state & QStyle::State_Active)) {
palette.setColor(QPalette::Inactive, QPalette::Text, palette.color(QPalette::Active, QPalette::Text));
}
op.palette = palette;
ParentStyleClass::drawControl(CE_ItemViewItem, &op, painter, widget);
return true;
}
This will fix the grey out issue for out of focus/resizing/moving dialog for most elements. But menus, dropdowns, labels and background keep changing. I hope this can help somehow :)
Can you open a merge request?
Well, I can but this is far from the final solution, don't you think?
The other day I found out that 1.0.0 (which is not available in this fork) doesn't mess with text/labels when out of focus/resizing/moving. This specific behavior started in 1.0.90. I tried to find what causes this change but the difference between these 2 versions is just too big so I gave up. It would be nice to also have that fix. We would be closer to proper fix this :)
Well, I can but this is far from the final solution, don't you think?
I unfortunately don't have time to look into this at this moment so I don't know.
The other day I found out that 1.0.0 (which is not available in this fork) doesn't mess with text/labels when out of focus/resizing/moving. This specific behavior started in 1.0.90. I tried to find what causes this change but the difference between these 2 versions is just too big so I gave up. It would be nice to also have that fix. We would be closer to proper fix this :)
Isn't this expected behavior? I think on GNOME when a window gets out of focus, some parts of the UI gets faded. I know there was an issue in ListView/TreeView widgets which can get faded even when the window is focused, that's what I was trying to fix, but not probably what your bug is about.
You're right when you say GNOME does that, but it's subtle. Look:
Focused:
Out of focus:
Also, this behavior is related to GNOME, not Adwaita (which is the default GTK theme). If you take a look at Xfce using Adwaita, nothing changes when a given window is out of focus, except the title bar (which is not driven by Adwaita anyway).
Also, in your Adwaita port to Qt the window contents get faded when we move or resize it, which does not happen even in GNOME.
It's OK if you don't agree to change this behavior, really. If could only tell me what to change I'll be super happy :)
This bug is not related to adwaita-qt
, it comes from qt5-qtwayland
since commit e532733. That issue occur even on fusion
style
I'm using 1.4.1 on LXQt and every time a window gets out of focus or is resized/moved its menu/list items get faded a bit. Is there a way to disable this? I'm a developer so changing code -- if necessary -- won't be a problem. :)
Thanks a lot for the hard work!