Bug#970983: sugar-themes: does not define @text_view_bg named colour

2020-09-28 Thread James Cameron
On Mon, Sep 28, 2020 at 09:18:56AM +0100, Simon McVittie wrote:
> On Mon, 28 Sep 2020 at 13:20:59 +1000, James Cameron wrote:
> > I've just tested Debian Testing (Bullseye), with src:sugar
> > 0.117-3, src:sugar-artwork:0.117-1, src:sugar-terminal-activity
> > version 47-1, src:vte2.91 version 0.62.0-1, and GTK 3.24.23-1 but
> > do not see any problem.
> > 
> > The terminal is correctly rendered in black on white or white on
> > black modes.
> 
> If sugar-terminal-activity hard-codes its background colour, you
> wouldn't see a problem.

Yes, sugar-terminal-activity hard-codes background colour of the Vte.

> The problem case is when vte is configured to inherit its colours
> from the theme. I don't know whether this is even possible with
> sugar-terminal-activity, but it is possible in gnome-terminal:
> https://gitlab.gnome.org/GNOME/vte/-/issues/284
> 
> Note that src:vte2.91 0.62.0-2 has a workaround, so you will need to
> hold src:vte2.91 at version 0.62.0-1 to reproduce this. Upstream
> asked me not to apply the workaround on the 0.63.x branch, so it is
> likely to go away after bullseye.

Yes, I checked that I used src:vte2.91 0.62.0-1 after seeing your
later changes on salsa git.  Thanks for warning, and sorry for not
mentioning.

> To reproduce this in GNOME (I used a test VM):
> - Run a gnome-terminal and gnome-tweaks
> - In gnome-terminal, right-click -> Preferences
> - profile -> Colors -> Text and Background -> Use colors from system
>   theme
> - In gnome-tweaks: Appearance -> Themes -> Applications ->
>   Sugar-100 or Sugar-72
> - Drag the two windows around to see the misrendering

Thanks.  It does reproduce.

> (I realise the Sugar themes are probably not *intended* to be used
> to theme non-Sugar GTK-based environments like GNOME and XFCE, but
> there is nothing that prevents it!)

Yes, an unexpected outcome.  Perhaps we should make the theme local to
Sugar and activities rather than make it available for other uses.

> The client-side-decoration window titlebar seems to have the same
> issue, so there are probably other named colours missing? Depending
> on the age of the theme, you might also need to add
> @theme_text_color and @unfocused_insensitive_color. See
> gtk/theme/Adwaita/_colors-public.scss in the gtk+3.0 source package
> for the full set.

Thanks.  I added these, which further fixed the Vte rendering, making
gnome-terminal useful again.  Window titlebar rendering was still
broken, even after I added _all_ remaining named colors from the full
set.  I don't know what is missing.

https://github.com/sugarlabs/sugar-artwork/pull/118

> > Please review
> > https://github.com/sugarlabs/sugar-artwork/pull/117
> 
> That looks suitable, although I haven't tested it.
> 
> smcv

-- 
James Cameron
http://quozl.netrek.org/



Bug#970983: sugar-themes: does not define @text_view_bg named colour

2020-09-28 Thread Simon McVittie
On Mon, 28 Sep 2020 at 13:20:59 +1000, James Cameron wrote:
> I've just tested Debian Testing (Bullseye), with src:sugar 0.117-3,
> src:sugar-artwork:0.117-1, src:sugar-terminal-activity version 47-1,
> src:vte2.91 version 0.62.0-1, and GTK 3.24.23-1 but do not see any
> problem.
> 
> The terminal is correctly rendered in black on white or white on black
> modes.

If sugar-terminal-activity hard-codes its background colour, you wouldn't
see a problem. The problem case is when vte is configured to inherit its
colours from the theme. I don't know whether this is even possible with
sugar-terminal-activity, but it is possible in gnome-terminal:
https://gitlab.gnome.org/GNOME/vte/-/issues/284

Note that src:vte2.91 0.62.0-2 has a workaround, so you will need to
hold src:vte2.91 at version 0.62.0-1 to reproduce this. Upstream asked
me not to apply the workaround on the 0.63.x branch, so it is likely to
go away after bullseye.

To reproduce this in GNOME (I used a test VM):
- Run a gnome-terminal and gnome-tweaks
- In gnome-terminal, right-click -> Preferences
- profile -> Colors -> Text and Background -> Use colors from system theme
- In gnome-tweaks: Appearance -> Themes -> Applications ->
  Sugar-100 or Sugar-72
- Drag the two windows around to see the misrendering

(I realise the Sugar themes are probably not *intended* to be used to
theme non-Sugar GTK-based environments like GNOME and XFCE, but there
is nothing that prevents it!)

The client-side-decoration window titlebar seems to have the same issue,
so there are probably other named colours missing? Depending on the age
of the theme, you might also need to add @theme_text_color and
@unfocused_insensitive_color. See gtk/theme/Adwaita/_colors-public.scss
in the gtk+3.0 source package for the full set.

> Please review
> https://github.com/sugarlabs/sugar-artwork/pull/117

That looks suitable, although I haven't tested it.

smcv



Bug#970983: sugar-themes: does not define @text_view_bg named colour

2020-09-27 Thread James Cameron
Thanks Simon,

I've just tested Debian Testing (Bullseye), with src:sugar 0.117-3,
src:sugar-artwork:0.117-1, src:sugar-terminal-activity version 47-1,
src:vte2.91 version 0.62.0-1, and GTK 3.24.23-1 but do not see any
problem.

The terminal is correctly rendered in black on white or white on black
modes.

I've looked at our GTK themes in https://github.com/sugarlabs/sugar-artwork
but they are unmaintained; changes to the GTK builtin theme since 3.20
are yet to be cascaded.

Is there a way to reproduce the problem?

Please review
https://github.com/sugarlabs/sugar-artwork/pull/117

-- 
James Cameron
http://quozl.netrek.org/



Bug#970983: sugar-themes: does not define @text_view_bg named colour

2020-09-25 Thread Simon McVittie
Package: sugar-themes
Version: 0.117-1
Severity: important
Tags: upstream

GTK 3.24.22 introduced a new named colour, @text_view_bg, which the vte
terminal library has started to rely on, causing misrendering in themes
that do not define it (see
). Other text-heavy
applications might also start to rely on that named colour in future,
particularly if they have a dark mode.

I've committed a workaround upstream in the 0.62.x branch, which will be
in Debian soon; but vte upstream asked me not to commit that change to
master, so the workaround will be going away in the next release cycle.
Please add @text_view_bg to this theme so it will not cause misrendering
in future.

The new colour is intended to be used as a background for text
views, contrasting well with @theme_text_color. For example, gnome-terminal
and other vte applications draw text in @theme_text_color on a background
of @text_view_bg.

The reference implementation is that in the light variant of GTK's default
Adwaita theme, @text_view_bg is the same white as @theme_base_color and
@content_view_bg, but in the dark variant of Adwaita, it's a darker grey
than @theme_base_color and @content_view_bg, to give white text better
contrast.

If this theme does not need to distinguish between text views and other
application content areas, defining @text_view_bg to be the same as
@theme_base_color or @content_view_bg would be appropriate.

Thanks,
smcv