Make Gwenview statusbar render correctly when using QtCurve theme
AbandonedPublic

Authored by rkron on Jan 27 2018, 5:24 PM.

Details

Reviewers
None
Group Reviewers
KDE Applications
Summary

Don't know how much interest there is in this. I've been experimenting with QtCurve and found that the Gwenview statusbar does not render when using QtCurve themes and the window opacity is less than 100%. Then I came across this post on reddit describing the same issue.

I looked into fixing QtCurve but did not come up with a satisfactory solution. But I found that creating these two QWidget objects with a parent causes the statusbar to render.

Unpatched Gwenview with QtCurve theme. Notice the black status bar at bottom.

Patched Gwenview with QtCurve. Notice that statusbar is now rendered properly.

I know it is really a QtCurve issue but this is such a trivial fix in Gwenview to accomodate it. I have not observed a similar issue in any other application.

Test Plan

Set a QtCurve theme with the window opacity less than 100%.

Run unpatched Gwenview and observe that the statusbar is not rendered.

Run patched Gwenview and observe that the statusbar is now rendered.

Diff Detail

Repository
R260 Gwenview
Lint
Lint Skipped
Unit
Unit Tests Skipped
rkron requested review of this revision.Jan 27 2018, 5:24 PM
rkron created this revision.

@rkron Somehow I only noticed your patch right now, sorry for leaving you hanging. As a general tip for Phabricator: If none of the group members of a group reviewer you set are noticing your patch, feel free to have a look in the Git history for recent contributors and add them as reviewers too.

Will review shortly.

We really need a Gwenview project. Baloo got one recently!

Have you tested to make sure that it didn't break with Breeze or Oxygen?

aacid added a subscriber: aacid.Feb 1 2018, 10:26 PM

We really need a Gwenview project. Baloo got one recently!

I'm not going to say "don't do it", but, think if a million different projects is really what we want, the more projects the more "reviewer fragmentation" that will probably happen, which is not always good.

I do not see this issue with the following version of Qtcurve , its possible this is fixed on upstream qtcurve already

Name : qtcurve-qt5
Version : 1.9.1.git20170710-2

or with

Name : qtcurve-kde
Version : 1.9.1.git20170710-2
Description : A configurable set of widget styles for Qt5 (with KDE integration)

I am using arch and these are the default pacakges for the distro

rkron added a comment.EditedFeb 1 2018, 11:12 PM

@ngraham I tested it again just now with Breeze and Oxygen and both are OK.
@rizzitello I also use arch and I have this issue with the version you mention. The window opacity (on the opacity page of the qtcurve config dialog) has to be something less than 100% for this issue to show up.
@rkflx Thanks!

rizzitello added a comment.EditedFeb 1 2018, 11:41 PM

Changing those settings do not make the status bar any less visible on my machine

rkron added a comment.Feb 2 2018, 12:13 AM

Maybe this is hardware or driver dependent. I think I will abandon this revision unless anyone has some other thoughts.

Well, does it hurt anything, I wonder? @rizzitello, does anything blow up if you run with this patch?

@ngraham I have not tested with this patch I will do so asap and report back with the results.

rkron added a comment.Feb 2 2018, 4:47 PM

FWIW, I've been using the patched version for about a month and there has been no problem. Glad to have someone else try it out also.

No explosions when using this patch ☹ . Gwenview ran showed my pictures had a status bar was very boring and did not crash. 👍

rkflx added a comment.Feb 2 2018, 9:00 PM

Tested it a bit too and found nothing wrong with it, although I cannot reproduce the issue in the first place (in a VM). Nevertheless I'm inclined to land it.

@rizzitello Are you testing on real hardware?

I found that creating these two QWidget objects with a parent causes the statusbar to render.

@rkron Could you explain why that magically fixes things? And why does it work for opaque windows without your patch? Are other styles which allow transparency also affected?

Did you test whether you get the same problem in other places in Gwenview where no parent is set? (You might want to grep through the code and then test that specific part, because finding all UI elements only by looking at the UI is surprisingly difficult. Let me know if I can help pointing to the clickpath given a class name.)

@rkflx Yes real hardware using the intel driver

rkron added a comment.Feb 2 2018, 9:34 PM

Sorry, it may be a while before I can think about this now. My dear friend went to the ER today and is in the hospital.

rkflx added a comment.Feb 2 2018, 9:38 PM

Sorry to hear, all the best.


For later:

Did you test whether you get the same problem in other places in Gwenview where no parent is set? (You might want to grep through the code […])

I think it's enough if you could test the "Save Bar", i.e. the toolbar that pops up right above your image if you rotate.

rkron added a comment.Feb 2 2018, 10:02 PM

I'm on my phone now and can't look at anything, but as for the why… What I remember is that qtcurve has a hook for X window creation that is only used when there is transparency (less than 100% opacity) and it makes a difference if the widget has a parent at the time. I worked with the qtcurve code a little and thought I had it so the parent issue didn't matter, but then I found it killed the transparency, so that was no fix.

I know this seems like a magic fix. I know creating widgets without a parent isn't that unusual, especially when they are going to be added to a layout. There are likely many such widgets in other applications that should have this issue, but for some reason do not.

rkron abandoned this revision.Feb 4 2018, 1:05 PM

There are other parentless widgets in gwenview that do not have this problem. It must take some unique combination of various factors for it to show up. It should be fixed in qtcurve, if possible.