0.88 Linux. system theme not adhered

*** Please report new bugs here! ***

Moderator: Dreamer

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Fri Nov 17, 2017 8:01 am

xnview wrote:and if you try XnView not xnview.sh to use system libraries?
In this case, XnView crashes with the following error message:

"This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem."

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Mon Nov 20, 2017 2:52 pm

roland65 wrote:I tested on the latest Ubuntu 17.10. There, I used the adwaita-qt package to match the adwaita gtk3 theme (I think there is no other way to match gtk3 themes). This worked with VirtualBox (that also uses Qt 5.9.2) but not with XnView MP 0.88, where the default Qt theme is always used.
could you try to extract this file in XnView/lib/platformthemes/
Pierre.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Sat Nov 25, 2017 9:19 am

xnview wrote:
roland65 wrote:I tested on the latest Ubuntu 17.10. There, I used the adwaita-qt package to match the adwaita gtk3 theme (I think there is no other way to match gtk3 themes). This worked with VirtualBox (that also uses Qt 5.9.2) but not with XnView MP 0.88, where the default Qt theme is always used.
could you try to extract this file in XnView/lib/platformthemes/
And what should I do with this file ? Could you explain me a bit further ?

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Sat Nov 25, 2017 9:49 am

roland65 wrote:
xnview wrote:
roland65 wrote:I tested on the latest Ubuntu 17.10. There, I used the adwaita-qt package to match the adwaita gtk3 theme (I think there is no other way to match gtk3 themes). This worked with VirtualBox (that also uses Qt 5.9.2) but not with XnView MP 0.88, where the default Qt theme is always used.
could you try to extract this file in XnView/lib/platformthemes/
And what should I do with this file ? Could you explain me a bit further ?
extract it in XnView/lib/platformthemes/ folder
Pierre.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Sat Nov 25, 2017 12:24 pm

xnview wrote:
roland65 wrote:
xnview wrote: could you try to extract this file in XnView/lib/platformthemes/
And what should I do with this file ? Could you explain me a bit further ?
extract it in XnView/lib/platformthemes/ folder
OK, I tried in Ubuntu 16.04 and it doesn't change anything.
On monday I'll try at work in Ubuntu 17.10...

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Sun Nov 26, 2017 12:24 pm

roland65 wrote: OK, I tried in Ubuntu 16.04 and it doesn't change anything.
On monday I'll try at work in Ubuntu 17.10...
which theme are you using? Could you send me a screenshot of 0.87 & 0.88?
Pierre.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Fri Dec 01, 2017 5:20 pm

xnview wrote:
roland65 wrote: OK, I tried in Ubuntu 16.04 and it doesn't change anything.
On monday I'll try at work in Ubuntu 17.10...
which theme are you using? Could you send me a screenshot of 0.87 & 0.88?
I use mainly a custom theme made from the Greybird theme of XFCE 4 (I changed the background color to light blue).
But the problem is the same whatever the used theme: starting from version 0.88, Xnview always use the default Fusion Qt 5 theme, and ignores the system theme.

I tested this on Ubuntu 17.10, and the issue is the same.

I attached the screenshots you requested (taken on Ubuntu 16.04.3).
Attachments
xnview-0_88.png
xnview-0_87.png

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Mon Dec 04, 2017 12:14 pm

roland65 wrote: I use mainly a custom theme made from the Greybird theme of XFCE 4 (I changed the background color to light blue).
Gtk3 theme?
But the problem is the same whatever the used theme: starting from version 0.88, Xnview always use the default Fusion Qt 5 theme, and ignores the system theme.
Is it possible with a standard theme, so i can check it?
Pierre.

jooch
Posts: 7
Joined: Mon Nov 06, 2017 5:59 pm

Re: 0.88 Linux. system theme not adhered

Post by jooch » Thu Dec 07, 2017 4:57 pm

I also tried with the file supplied, but no luck here either.

I use the vertex-maia-dark theme which is an official Manjaro theme up to date with the latest GTK3 code.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Fri Dec 08, 2017 9:13 am

OK, here are more test results about this bug.

I used the last Ubuntu version (17.10 Artful Aadvark) with a fresh install and the default Gnome desktop. The Qt version is 5.9.1. No custom themes installed.

1. Using gnome-tweak-tool, I switched the default Ambiance theme to Adwaita-dark. This theme is a standard Gnome GTK3 theme, provided with Adwaita as an alternative to the default theme. I used the dark variant because it allows to immediately see the theme differences between versions 0.87 and 0.88 of Xnview. The dark variant is standard as is the light one.

2. Screenshot xnview-0.87-adwaita-dark.png shows the look of Xnview version 0.87. As you can see, the background is black, as desired. The system theme Adwaita-dark is used by Xnview.

3. Screenshot xnview-0.88-adwaita-dark.png shows the look of Xnview version 0.88. Now, the background is light grey. The system theme is not used by Xnview.

4. I did some research on the Internet and found that starting with Qt 5.6, the system GTK theme can't be used directly, as it was the case with previous versions (indeed in Ubuntu 16.04, I used various Qt applications without any theme problem). There seems to be no global solution to this problem, except for the Adwaita theme. For this particular theme indeed, one has to install the package adwaita-qt and call Qt 5 applications with the '-style' parameter and then the Adwaita (or Adwaita-dark) theme is used by the Qt 5 application.

So I tried with Xnview 0.88 with the adwaita-qt package installed and running Xnview using the command: 'xnview -style Adwaita-dark'.
The result was the same as before, i.e. light background, dark theme not used.
On the console, Xnview returned this message (among others):
'QApplication: invalid style override passed, ignoring it.'

Then I tried with the Speedcrunch application, a scientific calculator written with Qt 5. I launched 'speedcrunch' and the dark theme was not used. I launched 'speedcrunch -style Adwaita-dark' and the dark theme was used.

I also tried with VirtualBox 5.2, which is another Qt 5 commercial application that recently switched to Qt 5.9. I launched VirtualBox without the '-style' parameter and the dark theme was not used. Then I launched 'VitualBox -style Adwaita-dark' and the dark style was used, as expected.

5. I also tried to launch the XnView binary, directly from the /opt/XnView directory, with and without the '-style' option and in both cases it crashed with the following error message:
'This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".'

So clearly, Xnview 0.88 can't use the '-style' parameter and always use the default Fusion Qt theme. Unfortunately, I don't have any idea about what causes the problem but I can perform other tests if you need it.
Attachments
xnview-0.88-adwaita-dark.png
xnview-0.87-adwaita-dark.png

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Fri Dec 22, 2017 2:20 pm

roland65 wrote: I used the last Ubuntu version (17.10 Artful Aadvark) with a fresh install and the default Gnome desktop. The Qt version is 5.9.1. No custom themes installed.

1. Using gnome-tweak-tool, I switched the default Ambiance theme to Adwaita-dark. This theme is a standard Gnome GTK3 theme, provided with Adwaita as an alternative to the default theme. I used the dark variant because it allows to immediately see the theme differences between versions 0.87 and 0.88 of Xnview. The dark variant is standard as is the light one.
How do you install/choose Adwaita-dark theme? I've installed a fresh 17.10
Pierre.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Sat Dec 23, 2017 8:51 am

Hi Pierre,

in Ubuntu, you have to install the gnome-tweak-tool package. Then launch this tool and in the Appearance tab you will find the default themes and you can switch between them.

Linux Mint uses the Cinnamon desktop, so I don't know if these instructions apply...

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Sat Dec 23, 2017 9:02 am

roland65 wrote: in Ubuntu, you have to install the gnome-tweak-tool package. Then launch this tool and in the Appearance tab you will find the default themes and you can switch between them.
yes done, but i don't have Adwaita-dark
Pierre.

roland65
Posts: 34
Joined: Wed Apr 19, 2017 11:53 am

Re: 0.88 Linux. system theme not adhered

Post by roland65 » Sat Dec 23, 2017 11:36 am

xnview wrote: yes done, but i don't have Adwaita-dark
OK, I got the point: you have to install the package gnome-themes-standard. Then you'll have the Adwaita and Adwaita-dark themes.

User avatar
xnview
Author of XnView
Posts: 29086
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.88 Linux. system theme not adhered

Post by xnview » Sat Dec 23, 2017 1:00 pm

roland65 wrote:
xnview wrote: yes done, but i don't have Adwaita-dark
OK, I got the point: you have to install the package gnome-themes-standard. Then you'll have the Adwaita and Adwaita-dark themes.
but it's a gtk 2 theme
https://launchpad.net/ubuntu/+source/gn ... s-standard
Pierre.

Post Reply