Convert to breakpoints and AdwDialogs#5
Conversation
| <object class="AdwHeaderBar"> | ||
| <property name="show-end-title-buttons">false</property><!-- I don't want a second copy of the window controls --> | ||
| </object> |
There was a problem hiding this comment.
I question the use of the multiple headerbars within the same window, which this makes use of multiple times. It seems rather messy.
There was a problem hiding this comment.
I agree, though if we are to unify the headerbars, it might require redesigning the "previous chapter" and "next chapter" buttons so the only bar is not too crowded (I think redesigning them is a good idea that needs to happen). What do you think about this idea:
- previous chapter button is at the top of the text, and moves away with the text as you scroll it
- next chapter button is at the bottom of the text (appears when you've scrolled to the bottom of the text).
Functionally, this makes it so you can't easily click the "next chapter" button (it will be in a different place every time), but if you want to skip forward, you can always use the chapter selector.
A benefit is that the 'next chapter' button is where you expect it to be: where the next chapter should appear.
(Ideally, we may someday want to have some form of infinite scrolling (chapter autoloading) instead of the previous/next chapter buttons, but I think that might be out of scope for this PR)
| <object class="GtkBox" id="content_actions"> | ||
| <property name="orientation">horizontal</property> | ||
| <property name="visible">false</property> | ||
| <child> | ||
| <object class="GtkButton" id="chapter_prev_navbtn"> | ||
| <property name="icon-name">go-previous-symbolic</property> | ||
| <style> | ||
| <class name="pill"/> | ||
| </style> | ||
| </object> | ||
| </child> | ||
| <child> | ||
| <object class="GtkButton" id="chapter_fwd_navbtn"> | ||
| <property name="icon-name">go-next-symbolic</property> | ||
| <style> | ||
| <class name="pill"/> | ||
| </style> | ||
| </object> | ||
| </child> | ||
| </object> |
There was a problem hiding this comment.
this lost a <class name="linked"/> and due to this being a headerbar, the background color of the buttons is the same as the background.
Breakpoints provide more reliable mobile behavior.
(basically followed migration guide at https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/migrating-to-breakpoints.html)
AdwDialogs integrate into the application with better close gestures for mobile devices, giving a significantly experience when using Phosh.
(this migration is documented here: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/migrating-to-adaptive-dialogs.html , though it's easy enough to do without consulting)
I also fixed an issue with the app window always being as wide as the longest translation's copyright statement you have loaded.
this increases minimum libadwaita version to 1.5.0 (which is older than some users of this app, by personal anecdote). (I have not verified that it compiles with the older version, just that the new features I used came from 1.4 and 1.5)
about.c and about.h were removed because trying to use it led to segfaults (I believe because of
g_object_unref(builder);being called beforeadw_dialog_present()?)A few compile-time deprecation warnings were resolved (I'm using libadwaita 1.9.0, so things which have been deprecated for me might not have been deprecated in earlier releases).
Each commit is fairly self-contained