-
Notifications
You must be signed in to change notification settings - Fork 2
Convert to breakpoints and AdwDialogs #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
earboxer
wants to merge
8
commits into
sp1ritCS:master
Choose a base branch
from
earboxer:breakpoints
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
04ce10a
Use AdwNavigationView instead of inner AdwLeaflet
earboxer 4ee550f
bible_item: ellipsize the copyright so it doesn't force the window to…
earboxer 177a446
Switch to NavigationSplitView
earboxer e4585bc
Replace deprecated gtk_widget_show with gtk_window_present
earboxer 82dce51
Change Preferences from AdwPreferencesWindow to AdwPreferencesDialog
earboxer 4048fa5
Change FideiBibleInfoDiag from GtkDialog to AdwDialog
earboxer ef6ff60
Change About page from GtkAboutDialog to AdwAboutDialog
earboxer f50de03
fixup! Change FideiBibleInfoDiag from GtkDialog to AdwDialog
earboxer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"> | ||
|
|
@@ -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> | ||
| </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
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this lost a |
||
| </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> | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
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)