mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
editor: Redesign translation section
This commit is contained in:
parent
55b344605b
commit
7d3ab7e56b
8 changed files with 80 additions and 45 deletions
|
|
@ -1,7 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusPersonEditor : Adw.NavigationPage {
|
||||
template $MusicusPersonEditor: Adw.NavigationPage {
|
||||
title: _("Person");
|
||||
|
||||
Adw.ToolbarView {
|
||||
|
|
@ -9,7 +9,19 @@ template $MusicusPersonEditor : Adw.NavigationPage {
|
|||
Adw.HeaderBar header_bar {}
|
||||
|
||||
Adw.Clamp {
|
||||
$MusicusTranslationSection name_section {}
|
||||
Gtk.Label {
|
||||
label: _("Name");
|
||||
xalign: 0;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
}
|
||||
|
||||
$MusicusTranslationEditor name_editor {
|
||||
margin-start: 12;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
29
data/ui/translation_editor.blp
Normal file
29
data/ui/translation_editor.blp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusTranslationEditor: Adw.Bin {
|
||||
Gtk.ListBox list_box {
|
||||
selection-mode: none;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.EntryRow entry_row {
|
||||
title: _("Name");
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Add translation");
|
||||
activatable: true;
|
||||
activated => $add_translation() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_person_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusTranslationSection : Adw.PreferencesGroup {
|
||||
title: _("Name");
|
||||
header-suffix: Gtk.Button add_button {
|
||||
styles ["flat"]
|
||||
clicked => $add_translation() swapped;
|
||||
|
||||
Adw.ButtonContent {
|
||||
icon-name: "list-add-symbolic";
|
||||
label: _("Translate");
|
||||
}
|
||||
};
|
||||
|
||||
Adw.EntryRow entry_row {
|
||||
title: _("Name");
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,19 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-start: 12;
|
||||
margin-end: 12;
|
||||
|
||||
$MusicusTranslationSection name_section {}
|
||||
Gtk.Label {
|
||||
label: _("Name");
|
||||
xalign: 0;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
}
|
||||
|
||||
$MusicusTranslationEditor name_editor {
|
||||
margin-top: 12;
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
label: _("Composers");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue