New issue
Advanced search Search tips

Issue 846716 link

Starred by 7 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

QT4 and QT5 apps could use better theme/style integration

Project Member Reported by reve...@chromium.org, May 25 2018

Issue description

QT4 example app is scribus. QT5 example is transmission-qt. 

QT4 apps can be made to use our GTK theme by adding:

[Qt]
style=GTK+

/etc/xdg/Trolltech.conf (system-wide) or ~/.config/Trolltech.conf (user-specific).

And we can do something similar for QT5:

$ sudo apt-get install qt5-style-plugins qt5-gtk-platformtheme

and then make sure QT_QPA_PLATFORMTHEME is set to gtk2. Example:

QT_QPA_PLATFORMTHEME=gtk2 transmission-qt

However, it seems to be causing some issues when using HiDPI:

QT_AUTO_SCREEN_SCALE_FACTOR=1 QT_QPA_PLATFORMTHEME=gtk2 transmission-qt

HiDPI support might be more important than getting the theme perfect for now.
 
My recommendation is to add a /etc/xdg/Trolltech.conf file with style=GTK+ to cros-ui-config package and add QT_AUTO_SCREEN_SCALE_FACTOR=1 to the default environment for now.

Project Member

Comment 2 by bugdroid1@chromium.org, May 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/1d1a032c23e50ac4872c82036fac6bafa93d8549

commit 1d1a032c23e50ac4872c82036fac6bafa93d8549
Author: Stephen Barber <smbarber@chromium.org>
Date: Sat May 26 00:11:42 2018

Improve styling and scaling for Qt apps

Add a Trolltech.conf file and set the QT_AUTO_SCREEN_SCALE_FACTOR
variable, which should improve the behavior of Qt apps.

BUG=chromium:846716
TEST=transmission-qt and scribus

Change-Id: I126782150dfa05c1cd04c6706b2cf2060bf4f29d
Reviewed-on: https://chromium-review.googlesource.com/1074213
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>

[add] https://crrev.com/1d1a032c23e50ac4872c82036fac6bafa93d8549/cros-ui-config/Trolltech.conf
[modify] https://crrev.com/1d1a032c23e50ac4872c82036fac6bafa93d8549/cros-ui-config/BUILD
[modify] https://crrev.com/1d1a032c23e50ac4872c82036fac6bafa93d8549/cros-garcon/BUILD
[modify] https://crrev.com/1d1a032c23e50ac4872c82036fac6bafa93d8549/cros-ui-config/conffiles
[modify] https://crrev.com/1d1a032c23e50ac4872c82036fac6bafa93d8549/cros-garcon/cros-garcon-override.conf

<triage>Can this bug be closed?</triage>
Cc: -jkardatzke@chromium.org
Owner: jkardatzke@chromium.org
I'll take a look at this one and see if we can close it.
Summary: QT4 and QT5 apps could use better theme/style integration (was: QT4 and QT5 apps don't fit into Chrome OS)
Can you elaborate on the problem with HiDPI reveman? transmission-qt seems to work with the gtk2+qt5 support that your steps enable.

https://chromium-review.googlesource.com/c/chromiumos/containers/cros-container-guest-tools/+/1402041
Not sure what the problem was. If things look good now then got for it.
Owner: jopra@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/5c5e2ea32ae1a797f669fac2716e6d6fd34e5b29

commit 5c5e2ea32ae1a797f669fac2716e6d6fd34e5b29
Author: Josh Pratt <jopra@chromium.org>
Date: Wed Jan 16 03:50:12 2019

Turn on CrosAdapta styling for qt5

Sets the QT_QPA_PLATFORMTHEME variable to use the gtk2 theme, which should
improve the behavior of Qt apps.
Adds qt5 packages for gtk interfacing.
Update version number

BUG=chromium:846716
TEST=transmission-qt and scribus

Change-Id: I95f7217d9f915246e2f48e51c1ce6520f628ff7e
Reviewed-on: https://chromium-review.googlesource.com/1402041
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>

[modify] https://crrev.com/5c5e2ea32ae1a797f669fac2716e6d6fd34e5b29/cros-adapta/BUILD
[modify] https://crrev.com/5c5e2ea32ae1a797f669fac2716e6d6fd34e5b29/cros-garcon/cros-garcon-override.conf

Comment 10 by jopra@chromium.org, Jan 16 (6 days ago)

Status: Started (was: Available)
I've merged a fix for this but need to verify that it works on a new container.

Sign in to add a comment