Skip to content

Convert to breakpoints and AdwDialogs#5

Open
earboxer wants to merge 8 commits into
sp1ritCS:masterfrom
earboxer:breakpoints
Open

Convert to breakpoints and AdwDialogs#5
earboxer wants to merge 8 commits into
sp1ritCS:masterfrom
earboxer:breakpoints

Conversation

@earboxer
Copy link
Copy Markdown

@earboxer earboxer commented May 16, 2026

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 before adw_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

Comment thread data/ui/fidei.ui
Comment on lines +157 to +159
<object class="AdwHeaderBar">
<property name="show-end-title-buttons">false</property><!-- I don't want a second copy of the window controls -->
</object>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I question the use of the multiple headerbars within the same window, which this makes use of multiple times. It seems rather messy.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread data/ui/fidei.ui
Comment on lines +207 to 226
<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>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread data/ui/info.ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants