Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions data/ui/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
-->

<interface>
<object id="diag" class="GtkAboutDialog">
<!--property name="logo-icon-name">arpa.sp1rit.Fidei</property-->
<property name="program-name">Fidei</property>
<object id="diag" class="AdwAboutDialog">
<property name="application-icon">arpa.sp1rit.Fidei</property>
<property name="application-name">Fidei</property>
<property name="comments" translatable="yes">Take back your faith</property>
<property name="copyright" translatable="yes">Copyright (c) 2022 Florian "sp1rit" and contributors</property>
<property name="license-type">GTK_LICENSE_AGPL_3_0</property>
<property name="website">https://github.com/sp1ritCS/fidei</property>
<property name="website-label">github.com/sp1ritCS/fidei</property>
<property name="authors">Florian "sp1rit" &lt;sp1rit@national.shitposting.agency&gt;</property>
<property name="developers">Florian "sp1rit" &lt;sp1rit@national.shitposting.agency&gt;</property>
</object>
</interface>
1 change: 1 addition & 0 deletions data/ui/bible_item.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</child>
<child>
<object class="GtkLabel" id="subtitle">
<property name="ellipsize">end</property>
<property name="single-line-mode">true</property>
<property name="xalign">0.0</property>
<property name="label"
Expand Down
263 changes: 111 additions & 152 deletions data/ui/fidei.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
</section>
</menu>
<template class="FideiAppWindow" parent="AdwApplicationWindow">
<property name="width-request">300</property>
<child>
<object class="AdwBreakpoint">
<condition>max-width: 450sp</condition>
<setter object="main" property="collapsed">True</setter>
</object>
</child>
<property name="content">
<object class="AdwToastOverlay" id="toasts">
<property name="child">
Expand Down Expand Up @@ -107,187 +114,139 @@
</object>
</child>
<child>
<object class="AdwLeaflet" id="main">
<property name="can-navigate-back">true</property>
<property name="can-navigate-forward">true</property>
<child>
<object class="AdwLeaflet" id="selector_stack">
<property name="can-unfold">false</property>
<property name="can-navigate-back">true</property>
<property name="can-navigate-forward">false</property>
<property name="transition-type">ADW_LEAFLET_TRANSITION_TYPE_SLIDE</property>
<child>
<object class="GtkScrolledWindow" id="booksel_scroll">
<property name="hscrollbar_policy">never</property>
<property name="child">
<object class="AdwClampScrollable">
<property name="margin-end">8</property>
<object class="AdwNavigationSplitView" id="main">
<property name="sidebar">
<object class="AdwNavigationPage">
<property name="title" translatable="yes">Selector</property>
<property name="child">
<object class="AdwNavigationView" id="selector_stack">
<child>
<object class="AdwNavigationPage">
<property name="title">Book Selection</property>
<property name="child">
<object class="GtkListView" id="book_selector">
<property name="single-click-activate">true</property>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/arpa/sp1rit/Fidei/ui/factory_bookitem.ui</property>
<object class="GtkScrolledWindow" id="booksel_scroll">
<property name="hscrollbar_policy">never</property>
<property name="child">
<object class="AdwClampScrollable">
<property name="margin-end">8</property>
<property name="child">
<object class="GtkListView" id="book_selector">
<property name="single-click-activate">true</property>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/arpa/sp1rit/Fidei/ui/factory_bookitem.ui</property>
</object>
</property>
<style>
<class name="navigation-sidebar"/>
</style>
</object>
</property>
</object>
</property>
<style>
<class name="navigation-sidebar"/>
</style>
</object>
</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkBox" id="chaptersel_box">
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="chapter_back_book_navbtn">
<property name="icon-name">go-previous-symbolic</property>
<property name="margin-top">8</property>
<property name="margin-start">8</property>
<property name="margin-end">12</property>
<property name="margin-bottom">8</property>
<style>
<class name="pill"/>
</style>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">horizontal</property>
</object>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="width-request">187</property>
<property name="hscrollbar_policy">never</property>
<property name="vexpand">true</property>
<object class="AdwNavigationPage" id="chaptersel_page">
<property name="title">Chapter Selection</property>
<property name="child">
<object class="AdwClampScrollable">
<property name="margin-top">8</property>
<property name="margin-start">8</property>
<property name="margin-end">12</property>
<property name="margin-bottom">8</property>
<property name="child">
<object class="GtkGridView" id="chapter_selector">
<property name="single-click-activate">true</property>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/arpa/sp1rit/Fidei/ui/factory_chapteritem.ui</property>
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="show-end-title-buttons">false</property><!-- I don't want a second copy of the window controls -->
</object>
Comment on lines +157 to +159

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)

</child>
<property name="content">
<object class="GtkScrolledWindow">
<property name="width-request">187</property>
<property name="hscrollbar_policy">never</property>
<property name="vexpand">true</property>
<property name="child">
<object class="AdwClampScrollable">
<property name="margin-top">8</property>
<property name="margin-start">8</property>
<property name="margin-end">12</property>
<property name="margin-bottom">8</property>
<property name="child">
<object class="GtkGridView" id="chapter_selector">
<property name="single-click-activate">true</property>
<property name="factory">
<object class="GtkBuilderListItemFactory">
<property name="resource">/arpa/sp1rit/Fidei/ui/factory_chapteritem.ui</property>
</object>
</property>
</object>
</property>
</object>
</property>
<style>
<class name="view"/>
</style>
</object>
</property>
</object>
</property>
<style>
<class name="view"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwLeafletPage">
<property name="navigatable">false</property>
<property name="child">
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="width-request">360</property>
<child>
<object class="GtkBox" id="content_actions">
<property name="orientation">horizontal</property>
<property name="visible">false</property> <!-- will be set to true once chapter has been opened. bound against seperator:visibe -->
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="hexpand">true</property>
<property name="halign">start</property>
<property name="margin-top">8</property>
<property name="margin-start">8</property>
<property name="margin-end">8</property>
<property name="margin-bottom">8</property>
<child>
<object class="GtkButton" id="leaflet_back_navbtn">
<property name="icon-name">go-first-symbolic</property>
<property name="visible"
bind-source="main"
bind-property="folded"
bind-flags="sync-create"/>
<style>
<class name="pill"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="margin-top">8</property>
<property name="margin-start">8</property>
<property name="margin-end">8</property>
<property name="margin-bottom">8</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>
</property>
<property name="content">
<object class="AdwNavigationPage">
<property name="title" translatable="yes">Content</property>
<property name="child">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<property name="show-title">false</property>
<property name="show-end-title-buttons">false</property>
<child type="end">
<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>
Comment on lines +207 to 226

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.

</child>
<style>
<class name="linked"/>
</style>

</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">horizontal</property>
<property name="visible"
bind-source="content_actions"
bind-property="visible"
bind-flags="sync-create|bidirectional"/>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="content">
<property name="hscrollbar_policy">never</property>
<property name="vexpand">true</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">daytime-sunrise-symbolic</property>
<property name="title" translatable="yes">Welcome to Fidei!</property>
<property name="description" translatable="yes">Pick a book from the sidebar on the left</property>
<property name="hexpand">true</property>
<property name="content">
<object class="GtkScrolledWindow" id="content">
<property name="hscrollbar_policy">never</property>
<property name="vexpand">true</property>
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">daytime-sunrise-symbolic</property>
<property name="title" translatable="yes">Welcome to Fidei!</property>
<property name="description" translatable="yes">Pick a book from the sidebar on the left</property>
<property name="hexpand">true</property>
<property name="vexpand">true</property>
</object>
</property>
</object>
</property>
</object>
</child>
</property>
</object>
</child>
</property>
</object>
</child>
</object>
Expand Down
Loading