elementary / granite

Library that extends GTK with common widgets and utilities
https://elementary.io
GNU Lesser General Public License v3.0
289 stars 60 forks source link

Add BackButton #692

Open leolost2605 opened 8 months ago

leolost2605 commented 8 months ago

Introduce a BackButton that automatically lables itself correctly with the preceding page and navigates back when clicked. Useful for elementary/switchboard#300 as well as in videos, appcenter, etc.

This will introduce an Adw dependency with minimum required version 1.4 which will break building granite on OS 7

leolost2605 commented 8 months ago

It now won't hide when there is no preceding page since that caused problems with it not being mapped again because it's not visible so that it won't recheck whether anything changed. It could still be implemented if needed but since there's usually always exactly one page that's the first and we know which one it is (Home on appcenter, category on settings, welcome on videos) I don't think it's worth the effort.

danirabbit commented 8 months ago

I think @tintou has some thoughts about adding Adw as a dep here in Granite