Dark theme variant support for Crostini |
||||
Issue descriptionSome Linux apps prefer a dark theme variant. They set this to true: https://developer.gnome.org/gtk3/3.2/GtkSettings.html#GtkSettings--gtk-application-prefer-dark-theme This doesn't work with the default crostini theme.
,
Jun 18 2018
I know Tilix supports it. I think recent versions (gtk3-based) of Electron apps (E.g. VS Code) also support it and sublime text does. However, except for tilix, these still rely X11 so I'll need to update sommelier to respect this too for the titlebar to change color. I'll put up a patch for that.
,
Jun 18 2018
I think you can also test it for all gtk3 apps by setting gtk-application-prefer-dark-theme = true
,
Jun 19 2018
Thanks, GTK3 support shouldn't be too difficult (We can add a gtk-dark.css with a different color set as a minimal fix). I don't currently know how to fix this is GTK2 (and therefore current Electron). I'll follow this up.
,
Jun 19 2018
Don't worry about GTK2, that's not going to work afiact. This is only for GTK3. Electron apps are switching to GTK3 and that's where we care about this working. GTK3 doesn't mean that Wayland and CSD are necessarily used. Electron (chromium linux) has support for GTK3 but only when using X11, not wayland. That's why we need the sommelier change so titlebars for GTK3-X11 apps match the theme.
,
Jun 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/aade9859c6d291aa035572623ac8ae8b2c259368 commit aade9859c6d291aa035572623ac8ae8b2c259368 Author: David Reveman <reveman@chromium.org> Date: Tue Jun 19 21:38:48 2018 vm_tools: sommelier: dark theme variant support Respect _GTK_THEME_VARIANT property. We were always setting the frame colors prior to this and now we're making that more explicit, while supporting the theme variant property. BUG= chromium:853548 TEST=xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT "dark" Change-Id: I34f8410cc1df804dc9029972b02421fcf41ab177 Reviewed-on: https://chromium-review.googlesource.com/1104306 Commit-Ready: David Reveman <reveman@chromium.org> Tested-by: David Reveman <reveman@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> [modify] https://crrev.com/aade9859c6d291aa035572623ac8ae8b2c259368/vm_tools/sommelier/sommelier.c [modify] https://crrev.com/aade9859c6d291aa035572623ac8ae8b2c259368/vm_tools/sommelier/sommelier.h [modify] https://crrev.com/aade9859c6d291aa035572623ac8ae8b2c259368/vm_tools/sommelier/sommelier.gyp
,
Jun 20 2018
Best test app for gtk3 theme is probable gtk3-demo-application. Instructions: $ sudo apt-get install gtk-3-examples $ gtk3-demo-application Preferences -> "Prefer Dark Theme"
,
Jun 21 2018
sgabriel@, what would be the preferred titlebar color for a dark theme variant? sommelier is using #121D23 for now.
,
Jun 25 2018
New Chrome incognito uses #323639, we can probably use that.
,
Jun 25 2018
Sgtm. Created https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1113517 to make that adjustment.
,
Jun 25 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/5c9f3dbb96d01fb291938b492df943bb36f6a8cc commit 5c9f3dbb96d01fb291938b492df943bb36f6a8cc Author: David Reveman <reveman@chromium.org> Date: Mon Jun 25 17:52:53 2018 vm_tools: sommelier: adjust dark theme frame color Use the same dark theme frame color by default as incognito windows. This also adds missing checks to ensure that frame colors are defined during build. BUG= chromium:853548 TEST=xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT "dark" Change-Id: I885d1d58055af86f8d5b4f7cf5f57458139c971d Reviewed-on: https://chromium-review.googlesource.com/1113517 Commit-Ready: David Reveman <reveman@chromium.org> Tested-by: David Reveman <reveman@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> [modify] https://crrev.com/5c9f3dbb96d01fb291938b492df943bb36f6a8cc/vm_tools/sommelier/sommelier.c [modify] https://crrev.com/5c9f3dbb96d01fb291938b492df943bb36f6a8cc/vm_tools/sommelier/sommelier.gyp
,
Jul 9
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/cros-adapta/+/9e72c457eaf06eaabaca8c41516750c9381680c8 commit 9e72c457eaf06eaabaca8c41516750c9381680c8 Author: Josh Pratt <jopra@chromium.org> Date: Mon Jul 09 04:23:24 2018 Add CrosAdapta:dark theme variant - Adds a new gtk-3.0/colors-dark.css that sets a dark colors scheme. - Adds a new gtk-3.*/gtk-dark.css entry point that matches gtk.css but uses the dark color scheme. The theme_bg_color has been set to "#323639", the Chrome Incognito background color. The rest of the dark color scheme is a copy of the light color scheme but swaps the core colors with their dark variant (e.g. swapping bg and fg colors). The specific color changes are: - Set theme_fg_color to #cfd8dc (was #5a5a5a). - Set theme_bg_color to #323639 (was #f2f2f2). - Set theme_text_color to #f2f2f2 (was #202124). - Set theme_inverted_fg_color to #5a5a5a (was #cfd8dc). - Set theme_base_color to #202124 (was #ffffff). Bug: 853548 Change-Id: If8fc2bd49a754ebe8eab518fa130a40554737942 Reviewed-on: https://chromium-review.googlesource.com/1126692 Commit-Ready: Josh Pratt <jopra@chromium.org> Tested-by: Josh Pratt <jopra@chromium.org> Reviewed-by: Raymes Khoury <raymes@chromium.org> [add] https://crrev.com/9e72c457eaf06eaabaca8c41516750c9381680c8/gtk-3.22/gtk-dark.css [add] https://crrev.com/9e72c457eaf06eaabaca8c41516750c9381680c8/gtk-3.0/gtk-dark.css [add] https://crrev.com/9e72c457eaf06eaabaca8c41516750c9381680c8/gtk-3.0/colors-dark.css
,
Jul 10
https://chromium-review.googlesource.com/1126692 should resolve this bug. The dark theme can be used in gnome-terminal by changing the theme variant preference, globally using gnome-tweak-tool or via gsettings.
,
Jul 10
Adding a screenshot of gnome-terminal for later reference.
,
Jul 10
|
||||
►
Sign in to add a comment |
||||
Comment 1 by jopra@chromium.org
, Jun 18 2018