-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Redesign book detail view #948
Draft
Haaruun-I
wants to merge
18
commits into
geigi:master
Choose a base branch
from
Haaruun-I:book-detail-view
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.
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7ccf679
Add chapter bar tooltip
Haaruun-I 09c44aa
Add menu items to the book details page
Haaruun-I f38ab9c
Rename "Availible Offline" to "Download Book"
Haaruun-I 53b7b8e
Add fallback icon to book detail view
Haaruun-I 567871b
Change ProgressRing to ProgressBar
Haaruun-I d02cd66
Move time labels
Haaruun-I 09b12e6
Add placeholder total time text
Haaruun-I 0ed0d60
Change remaining_label to progress_label
Haaruun-I f6c1277
Fix margins
Haaruun-I 114d43b
Give two lines to title text
Haaruun-I ea901f7
Move play button to right hand side
Haaruun-I 5ab7ceb
Linter errors whoops
Haaruun-I 9825c11
Update book progress on page open
Haaruun-I 991215d
Revert "Temporary UI Bugfix"
Haaruun-I 7283b75
Merge branch 'geigi:master' into book-detail-view
Haaruun-I 7014246
Add `Remove from Recents` to book details menu
Haaruun-I be9c992
Remove new menu item and move play button
Haaruun-I 594f285
Reuse "Loading…" string
Haaruun-I 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 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 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 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 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 |
---|---|---|
|
@@ -60,9 +60,10 @@ template $BookDetail: Adw.NavigationPage { | |
margin-end: 18; | ||
margin-top: 12; | ||
margin-bottom: 18; | ||
halign: start; | ||
halign: fill; | ||
hexpand: true; | ||
|
||
Box album_art_container { | ||
Stack album_art_container { | ||
halign: center; | ||
width-request: 200; | ||
height-request: 200; | ||
|
@@ -73,24 +74,27 @@ template $BookDetail: Adw.NavigationPage { | |
] | ||
} | ||
|
||
Image fallback_icon { | ||
pixel-size: 200; | ||
} | ||
|
||
styles [ | ||
"card", | ||
] | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
margin-top: 12; | ||
margin-bottom: 12; | ||
spacing: 6; | ||
vexpand: false; | ||
|
||
|
||
Label book_label { | ||
halign: start; | ||
label: bind template.book_title; | ||
ellipsize: end; | ||
max-width-chars: 35; | ||
lines: 1; | ||
lines: 2; | ||
rdbende marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
styles [ | ||
"title-1", | ||
|
@@ -111,72 +115,26 @@ template $BookDetail: Adw.NavigationPage { | |
] | ||
} | ||
|
||
ProgressBar book_progress_bar { | ||
} | ||
|
||
Box { | ||
valign: end; | ||
margin-top: 18; | ||
spacing: 6; | ||
orientation: horizontal; | ||
hexpand: true; | ||
halign: fill; | ||
|
||
$ProgressRing book_progress_ring { | ||
valign: center; | ||
Label progress_label { | ||
halign: start; | ||
} | ||
|
||
Grid { | ||
Label total_label{ | ||
halign: end; | ||
hexpand: true; | ||
row-spacing: 3; | ||
column-spacing: 20; | ||
|
||
Label { | ||
halign: start; | ||
hexpand: true; | ||
label: _("Remaining"); | ||
|
||
styles [ | ||
"dim-label", | ||
] | ||
|
||
layout { | ||
column: 0; | ||
row: 0; | ||
} | ||
} | ||
|
||
Label remaining_label { | ||
hexpand: true; | ||
xalign: 0; | ||
|
||
layout { | ||
column: 1; | ||
row: 0; | ||
} | ||
} | ||
|
||
Label { | ||
halign: start; | ||
hexpand: true; | ||
label: _("Total"); | ||
|
||
styles [ | ||
"dim-label", | ||
] | ||
|
||
layout { | ||
column: 0; | ||
row: 1; | ||
} | ||
} | ||
|
||
Label total_label{ | ||
hexpand: true; | ||
xalign: 0; | ||
|
||
layout { | ||
column: 1; | ||
row: 1; | ||
} | ||
} | ||
label: _("Loading…"); | ||
} | ||
} | ||
|
||
|
||
Button play_button { | ||
halign: start; | ||
valign: end; | ||
|
@@ -243,11 +201,30 @@ template $BookDetail: Adw.NavigationPage { | |
} | ||
|
||
menu book_menu_model { | ||
section { | ||
item { | ||
action: 'app.mark_book_as_read'; | ||
label: _("Mark as Read"); | ||
} | ||
|
||
item { | ||
action: 'app.jump_to_book_folder'; | ||
label: _("Open in Files"); | ||
} | ||
} | ||
|
||
section { | ||
item { | ||
action: 'book_overview.download'; | ||
label: _("_Available Offline"); | ||
label: _("Download Book"); | ||
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 is a two-state action, that's why I went with "Available Offline". |
||
hidden-when: "action-disabled"; | ||
} | ||
} | ||
|
||
section { | ||
item { | ||
action: 'app.remove_book'; | ||
label: _("Delete Permanently…"); | ||
} | ||
} | ||
} |
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.
This could be set from the Blueprint file