Skip to content

Commit

Permalink
use a more GNOME-like design for now playing view
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Oct 26, 2023
1 parent 24d58ee commit 71a272b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
9 changes: 2 additions & 7 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,6 @@ label.bold-link link {
}

button.large {
min-width: 48px;
min-height: 48px;
}

button.larger {
min-height: 60px;
min-width: 60px;
min-width: 40px;
min-height: 40px;
}
11 changes: 8 additions & 3 deletions data/ui/components/player/now-playing/view.blp
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,22 @@ template $PlayerNowPlayingView : Adw.NavigationPage {
styles [
"circular",
"large",
"flat",
]
}

Button play_button {
tooltip-text: _("Play");
tooltip-text: _("Toggle Play/Pause");
action-name: "player.play-pause";

styles [
"circular",
"larger",
"pill",
"suggested-action",
]

Image play_image {
pixel-size: 26;
}
}

Button next_button {
Expand All @@ -179,6 +183,7 @@ template $PlayerNowPlayingView : Adw.NavigationPage {
styles [
"circular",
"large",
"flat",
]
}

Expand Down
2 changes: 1 addition & 1 deletion data/ui/window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Adw 1;
template $MuzikaWindow : Adw.ApplicationWindow {
default-width: 1000;
default-height: 800;
width-request: 300;
width-request: 330;
height-request: 200;

styles [
Expand Down
1 change: 0 additions & 1 deletion src/components/player/full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class FullPlayerView extends Gtk.ActionBar {
"subtitle",
"shuffle_button",
"prev_button",
"play_button",
"play_image",
"next_button",
"repeat_button",
Expand Down
6 changes: 3 additions & 3 deletions src/components/player/now-playing/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PlayerNowPlayingView extends Adw.NavigationPage {
"picture",
"timestamp",
"duration",
"play_button",
"play_image",
"switcher_bar",
"overlay_bin",
"repeat_button",
Expand Down Expand Up @@ -65,7 +65,7 @@ export class PlayerNowPlayingView extends Adw.NavigationPage {
private _picture!: FixedRatioThumbnail;
private _timestamp!: Gtk.Label;
private _duration!: Gtk.Label;
private _play_button!: Gtk.Button;
private _play_image!: Gtk.Image;
private _switcher_bar!: Adw.ViewSwitcherBar;
private _overlay_bin!: Adw.Bin;
private _repeat_button!: Gtk.ToggleButton;
Expand Down Expand Up @@ -139,7 +139,7 @@ export class PlayerNowPlayingView extends Adw.NavigationPage {
},
null,
),
bind_play_icon(this._play_button),
bind_play_icon(this._play_image),
...bind_repeat_button(this._repeat_button),
);
}
Expand Down

0 comments on commit 71a272b

Please sign in to comment.