Skip to content

Commit

Permalink
Merge pull request #98 from vixalien/page-improvements
Browse files Browse the repository at this point in the history
Page loading improvements
  • Loading branch information
vixalien authored Feb 5, 2024
2 parents 11d3104 + adc34ab commit e2339ff
Show file tree
Hide file tree
Showing 45 changed files with 518 additions and 314 deletions.
1 change: 1 addition & 0 deletions data/com.vixalien.muzika.data.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<file preprocess="xml-stripblanks">icons/scalable/actions/playlist2-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/profit-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/progress-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/refresh-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/sentiment-satisfied-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/skip-backwards-10-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/scalable/actions/skip-forward-10-symbolic.svg</file>
Expand Down
2 changes: 2 additions & 0 deletions data/icons/scalable/actions/refresh-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion data/ui/components/library/history.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $HistoryPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: Adw.BreakpointBin {
width-request: 200;
Expand Down
8 changes: 7 additions & 1 deletion data/ui/components/library/songs.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $LibrarySongsPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: Adw.BreakpointBin {
width-request: 200;
Expand Down
1 change: 1 addition & 0 deletions data/ui/components/nav/page.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using Adw 1;
template $Page : $AdwNavigationPage {
Stack stack {
vhomogeneous: false;
transition-type: crossfade;

Adw.Bin loading {
Adw.ToolbarView {
Expand Down
6 changes: 6 additions & 0 deletions data/ui/pages/album.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ template $AlbumPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}

[end]
MenuButton menu {
icon-name: "view-more-symbolic";
Expand Down
8 changes: 7 additions & 1 deletion data/ui/pages/artist-albums.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $ArtistAlbumsPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: ScrolledWindow scrolled {
hexpand: true;
Expand Down
6 changes: 6 additions & 0 deletions data/ui/pages/artist.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ template $ArtistPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}

[end]
MenuButton menu {
icon-name: "view-more-symbolic";
Expand Down
117 changes: 64 additions & 53 deletions data/ui/pages/authentication-error.blp
Original file line number Diff line number Diff line change
@@ -1,74 +1,85 @@
using Gtk 4.0;
using Adw 1;

template $AuthenticationErrorPage : Box {
Adw.StatusPage status {
hexpand: true;
icon-name: "system-lock-screen-symbolic";
title: _("Authentication is required");
template $AuthenticationErrorPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

Box more {
orientation: vertical;
spacing: 6;
Adw.StatusPage status {
hexpand: true;
icon-name: 'system-lock-screen-symbolic';
title: _('Authentication is required');

Box buttons {
halign: center;
margin-bottom: 12;
Box more {
orientation: vertical;
spacing: 6;

Button {
label: _("Log in");
action-name: "win.login";
Box buttons {
halign: center;
margin-bottom: 12;
spacing: 6;

styles [
"pill",
"suggested-action",
]
}
Button {
label: _('Log in');
action-name: 'win.login';

Button home_button {
label: _("Go to Home");

styles [
"pill",
]
}
}
styles [
"pill",
"suggested-action",
]
}

Expander expander {
label: _("Error Details");
halign: center;
}
Button home_button {
label: _('Go to Home');

Revealer {
reveal-child: bind expander.expanded;
styles [
"pill",
]
}
}

Adw.Clamp {
maximum-size: 1000;
tightening-threshold: 600;
Expander expander {
label: _('Error Details');
halign: center;
}

Box {
margin-top: 6;
margin-bottom: 6;
margin-end: 6;
margin-start: 6;
Revealer {
reveal-child: bind-property expander.expanded;

styles [
"card",
]
Adw.Clamp {
maximum-size: 1000;
tightening-threshold: 600;

TextView text_view {
hexpand: true;
top-margin: 12;
bottom-margin: 12;
left-margin: 12;
right-margin: 12;
wrap-mode: word_char;
editable: false;
Box {
margin-top: 6;
margin-bottom: 6;
margin-end: 6;
margin-start: 6;

styles [
"transparent",
"card",
]

TextView text_view {
hexpand: true;
top-margin: 12;
bottom-margin: 12;
left-margin: 12;
right-margin: 12;
wrap-mode: word_char;
editable: false;

styles [
"transparent",
]
}
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion data/ui/pages/channel-playlists.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $ChannelPlaylistsPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: ScrolledWindow scrolled {
hexpand: true;
Expand Down
6 changes: 6 additions & 0 deletions data/ui/pages/channel.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ template $ChannelPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}

[end]
MenuButton menu {
icon-name: "view-more-symbolic";
Expand Down
8 changes: 7 additions & 1 deletion data/ui/pages/charts.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $ChartsPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: ScrolledWindow scrolled {
vexpand: true;
Expand Down
83 changes: 47 additions & 36 deletions data/ui/pages/error.blp
Original file line number Diff line number Diff line change
@@ -1,51 +1,62 @@
using Gtk 4.0;
using Adw 1;

template $ErrorPage : Box {
Adw.StatusPage status {
hexpand: true;
icon-name: "dialog-question-symbolic";
title: _("An error occurred");
description: "";

Box more {
orientation: vertical;
spacing: 6;

Expander expander {
label: _("Error Details");
halign: center;
template $ErrorPage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

Adw.StatusPage status {
hexpand: true;
icon-name: 'dialog-question-symbolic';
title: _('An error occurred');
description: '';

Revealer {
reveal-child: bind expander.expanded;
Box more {
orientation: vertical;
spacing: 6;

Adw.Clamp {
maximum-size: 1000;
tightening-threshold: 600;
Expander expander {
label: _('Error Details');
halign: center;
}

Box {
margin-top: 6;
margin-bottom: 6;
margin-end: 6;
margin-start: 6;
Revealer {
reveal-child: bind expander.expanded;

styles [
"card",
]
Adw.Clamp {
maximum-size: 1000;
tightening-threshold: 600;

TextView text_view {
hexpand: true;
top-margin: 12;
bottom-margin: 12;
left-margin: 12;
right-margin: 12;
wrap-mode: word_char;
editable: false;
Box {
margin-top: 6;
margin-bottom: 6;
margin-end: 6;
margin-start: 6;

styles [
"transparent",
"card",
]

TextView text_view {
hexpand: true;
top-margin: 12;
bottom-margin: 12;
left-margin: 12;
right-margin: 12;
wrap-mode: word_char;
editable: false;

styles [
"transparent",
]
}
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion data/ui/pages/explore.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ using Adw 1;
template $ExplorePage : Adw.Bin {
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
Adw.HeaderBar {
[start]
Button {
icon-name: "refresh";
action-name: "navigator.reload";
}
}

content: ScrolledWindow scrolled {
vexpand: true;
Expand Down
Loading

0 comments on commit e2339ff

Please sign in to comment.