Bug 210334 - [GTK4] Use ThemeAdwaita instead of ThemeGtk
Summary: [GTK4] Use ThemeAdwaita instead of ThemeGtk
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-04-10 07:27 PDT by Adrian Perez
Modified: 2020-04-13 22:13 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.53 KB, patch)
2020-04-10 07:32 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff
Patch v2 (3.33 KB, patch)
2020-04-13 10:31 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2020-04-10 07:27:37 PDT
With GTK4 we cannot obtain the selection theme colors,
so instead use ThemeAdwaita which uses the colors from
the default theme used by GTK.
Comment 1 Adrian Perez 2020-04-10 07:32:04 PDT
Created attachment 396080 [details]
Patch
Comment 2 Claudio Saavedra 2020-04-10 14:29:32 PDT
With GTK3 the selection colors are actually deprecated, so this is also a problem if we want to completely remove deprecated API usage. Do we want to continue using them?
Comment 3 Claudio Saavedra 2020-04-10 14:30:08 PDT
I meant the style context selection color APIs, for what it's worth.
Comment 4 Adrian Perez 2020-04-10 16:15:06 PDT
(In reply to Claudio Saavedra from comment #2)
> With GTK3 the selection colors are actually deprecated, so this is also a
> problem if we want to completely remove deprecated API usage. Do we want to
> continue using them?

Carlos Garcia specifically added ThemeGtk to have a minimum degree of
integration with the system theme, so I think we should keep using it
for now when building against GTK3.
Comment 5 Carlos Garcia Campos 2020-04-11 02:52:27 PDT
(In reply to Adrian Perez from comment #4)
> (In reply to Claudio Saavedra from comment #2)
> > With GTK3 the selection colors are actually deprecated, so this is also a
> > problem if we want to completely remove deprecated API usage. Do we want to
> > continue using them?
> 
> Carlos Garcia specifically added ThemeGtk to have a minimum degree of
> integration with the system theme, so I think we should keep using it
> for now when building against GTK3.

Yes, let's add deprecation guards if needed.
Comment 6 Adrian Perez 2020-04-13 10:31:45 PDT
Created attachment 396304 [details]
Patch v2

Same as before, adding deprecation guards in ThemeGtk.cpp
Comment 7 EWS 2020-04-13 22:13:04 PDT
Committed r260058: <https://trac.webkit.org/changeset/260058>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396304 [details].