mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
229 lines
5.7 KiB
Text
229 lines
5.7 KiB
Text
using Gtk 4.0;
|
|
using Adw 1;
|
|
|
|
template $MusicusProgramEditor: Adw.NavigationPage {
|
|
title: _("Program");
|
|
|
|
Adw.ToolbarView {
|
|
[top]
|
|
Adw.HeaderBar header_bar {}
|
|
|
|
Gtk.ScrolledWindow {
|
|
Adw.Clamp {
|
|
Gtk.Box {
|
|
orientation: vertical;
|
|
margin-bottom: 24;
|
|
margin-start: 12;
|
|
margin-end: 12;
|
|
|
|
Gtk.Label {
|
|
label: _("Appearance");
|
|
xalign: 0;
|
|
margin-top: 24;
|
|
|
|
styles [
|
|
"heading",
|
|
]
|
|
}
|
|
|
|
Gtk.ListBox {
|
|
selection-mode: none;
|
|
margin-top: 12;
|
|
|
|
styles [
|
|
"boxed-list",
|
|
]
|
|
|
|
Adw.EntryRow title_row {
|
|
title: _("Title");
|
|
}
|
|
|
|
Adw.EntryRow description_row {
|
|
title: _("Description");
|
|
}
|
|
|
|
Adw.PreferencesRow design_row {
|
|
title: _("Design");
|
|
activatable: false;
|
|
focusable: false;
|
|
|
|
Gtk.Box {
|
|
orientation: vertical;
|
|
spacing: 8;
|
|
margin-start: 12;
|
|
margin-end: 12;
|
|
margin-top: 6;
|
|
margin-bottom: 6;
|
|
|
|
Gtk.Label {
|
|
label: _("Design");
|
|
xalign: 0.0;
|
|
|
|
styles [
|
|
"subtitle",
|
|
]
|
|
}
|
|
|
|
Gtk.Box {
|
|
spacing: 6;
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-1'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-1",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-2'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-2",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-3'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-3",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-4'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-4",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-5'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-5",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'program-6'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"program-6",
|
|
"circular",
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Gtk.Label {
|
|
label: _("Settings");
|
|
xalign: 0;
|
|
margin-top: 24;
|
|
|
|
styles [
|
|
"heading",
|
|
]
|
|
}
|
|
|
|
Gtk.ListBox {
|
|
selection-mode: none;
|
|
margin-top: 12;
|
|
|
|
styles [
|
|
"boxed-list",
|
|
]
|
|
|
|
$MusicusSliderRow {
|
|
title: _("Prefer recordings that haven't been played for a long time");
|
|
suffix: _("%");
|
|
|
|
adjustment: Gtk.Adjustment prefer_least_recently_played_adjustment {
|
|
lower: 0;
|
|
upper: 100;
|
|
step-increment: 1;
|
|
page-increment: 10;
|
|
};
|
|
}
|
|
|
|
$MusicusSliderRow {
|
|
title: _("Prefer recordings that were recently added");
|
|
suffix: _("%");
|
|
|
|
adjustment: Gtk.Adjustment prefer_recently_added_adjustment {
|
|
lower: 0;
|
|
upper: 100;
|
|
step-increment: 1;
|
|
page-increment: 10;
|
|
};
|
|
}
|
|
|
|
$MusicusSliderRow {
|
|
title: _("Avoid repeating composers");
|
|
suffix: _(" min");
|
|
|
|
adjustment: Gtk.Adjustment avoid_repeated_composers_adjustment {
|
|
lower: 0;
|
|
upper: 120;
|
|
step-increment: 10;
|
|
page-increment: 30;
|
|
};
|
|
}
|
|
|
|
$MusicusSliderRow {
|
|
title: _("Avoid repeating instruments");
|
|
suffix: _(" min");
|
|
|
|
adjustment: Gtk.Adjustment avoid_repeated_instruments_adjustment {
|
|
lower: 0;
|
|
upper: 120;
|
|
step-increment: 10;
|
|
page-increment: 30;
|
|
};
|
|
}
|
|
|
|
Adw.SwitchRow play_full_recordings_row {
|
|
title: _("Play full recordings");
|
|
}
|
|
}
|
|
|
|
Gtk.ListBox {
|
|
selection-mode: none;
|
|
margin-top: 24;
|
|
|
|
styles [
|
|
"boxed-list",
|
|
]
|
|
|
|
Adw.ButtonRow save_row {
|
|
title: _("_Save program");
|
|
use-underline: true;
|
|
activated => $save() swapped;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|