Commit Graph

14 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto 3656cffcc0 carousel: Cleanup overlays
There are overlays inside overlays and that is not playing well
with event delivery - the main box is eating away clicks from the
userlist avatars.

Remove all that, and the extra overlays, and just leave one simple
overlay handling the whole widgetry.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto cd7d6a3845 carousel: Reindent file
No functional changes, just reindent the file.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 486183a017 carousel: Move margins to inner stack 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto adaea91a4c carousel: Remove pass-through from overlay children
It doesn't exist anymore.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto b71b83f348 carousel: Port MctCarousel to GTK4
Make it an AdwBin subclass. Purge all GtkContainer usage, and expose
GTK4-inspired API to add items to the carousel, and also to control
the internal GtkRevealer.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 8560ca0677 project: Simplify buttons
GtkButton has an 'icon-name' property that greatly simplifies
setting up buttons. GtkMenuButton has a new 'always-show-arrow'
property that also allows us to simplify some code.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 631df4f1a5 project: Adapt to GtkBox API changes
GtkBox provides a different API surface, such as gtk_box_append()
and gtk_box_prepend(), so switch to that.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto d142554ed3 malcontent-control: Replace border-width by margins
The 'border-width' property does not exist in GTK4 anymore, so
replace it with margin-* and in one case just remove it entirely.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto a8484b9c07 project: Port to GTK4 accessibility framework
This was simple, since few widgets have accessibility properties
manually set. The 'static' role doesn't exist anymore, and GtkLabel
handles everything for us, so we can just drop it.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 262d6a6e7a project: Remove most can-focus properties
In GTK4, can-focus usage is much more specific to widget subclasses,
and in almost all cases it's not necessary to set it.

Remove it everywhere, except in one case where it still needs to be
manually set to False.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 5bec6e8fdc project: Remove all visible=True properties
Start the GTK4 port by cleaning up all visible=True properties,
since widgets are visible by default on GTK4.
2022-07-20 19:23:12 -03:00
Philip Withnall 484993b658 malcontent-control: Add basic accessibility support to g-c-c widgets
Not submitting this upstream as it hasn’t been tested thoroughly enough.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:31:42 +00:00
Philip Withnall 2c043a6bd5 malcontent-control: Reformat and rename code from gnome-control-center
Make it fit in with the surrounding code style, and rename the classes
to `MctCarousel` and `MctUserControls`. List them in `meson.build` and
`POTFILES.in`. No other changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:31:42 +00:00
Philip Withnall aa6ece8a91 malcontent-control: Add widgets from gnome-control-center
Add `CcCarousel` and `CcAppPermissions` from gnome-control-center and
rename the files. None of the contents of the files have been changed
yet. The files are from git master of gnome-control-center on
2020-01-08.

`carousel.{c,h,ui}` are licensed under GPLv2+, and are copyright 2016
Red Hat, Inc. The original author was Felipe Borges.

`user-controls.{c,h,ui}` are licensed under GPLv3+, and are copyright
2018, 2019 Endless, Inc.

`gs-content-rating.{c,h}` are originally from gnome-software, are
licensed under GPLv2+, and are copyright 2015, 2016 Richard Hughes. He
was also the original author. These files are needed by
`user-controls.{c,h}`.

`user-image.{c,h}` are licensed under GPLv2+ and are copyright 2015, Red
Hat, Inc. The original author was Ondrej Holy.

This code will not stay as copy-paste code for too long. The ultimate
plan is to rework most of the widgets:
 • `CcCarousel`: Will be reworked to provide more information about the
   screen time usage of each user. It will become a summary widget as
   well as a selector.
 • `GsContentRating`: Will be abstracted out into libappstream-glib, or
   some other suitable library, where its implementation can be shared
   between gnome-software and malcontent.
 • `CcUserControls`: Will be reworked as the UI of malcontent evolves.
   Will also be removed from gnome-control-center once malcontent-control
   is released.
 • `CcUserImage`: As per `CcCarousel`, this will evolve into a new
   widget.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-29 15:28:21 +00:00