mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
273 lines
6.9 KiB
Text
273 lines
6.9 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: "'default'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"default",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'blue'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"blue",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'teal'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"teal",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'green'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"green",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'yellow'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"yellow",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'orange'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"orange",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'red'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"red",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'pink'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"pink",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'purple'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"purple",
|
|
"circular",
|
|
]
|
|
}
|
|
|
|
Gtk.ToggleButton {
|
|
action-name: "program.set-design";
|
|
action-target: "'slate'";
|
|
|
|
styles [
|
|
"program-design-button",
|
|
"slate",
|
|
"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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|