mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 03:47:23 +01:00
editor: Fix popover parents
This commit is contained in:
parent
5956b7ff15
commit
757022393f
6 changed files with 88 additions and 74 deletions
|
|
@ -18,7 +18,7 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -32,24 +32,27 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox recordings_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
margin-bottom: 24;
|
||||
Gtk.Box recordings_box {
|
||||
Gtk.ListBox recordings_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
margin-bottom: 24;
|
||||
hexpand: true;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _recording");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $select_recording() swapped;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _recording");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $select_recording() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +61,7 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow save_row {
|
||||
|
|
|
|||
|
|
@ -72,19 +72,22 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox performer_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
Gtk.Box performers_box {
|
||||
Gtk.ListBox performer_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
hexpand: true;
|
||||
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _performer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $select_person() swapped;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _performer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $select_person() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -98,19 +101,22 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox ensemble_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
Gtk.Box ensembles_box {
|
||||
Gtk.ListBox ensemble_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
hexpand: true;
|
||||
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _ensemble");
|
||||
use-underline: true;
|
||||
start-icon-name: "list-add-symbolic";
|
||||
activated => $select_ensemble() swapped;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _ensemble");
|
||||
use-underline: true;
|
||||
start-icon-name: "list-add-symbolic";
|
||||
activated => $select_ensemble() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,19 +40,22 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox composer_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
Gtk.Box composers_box {
|
||||
Gtk.ListBox composer_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
hexpand: true;
|
||||
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _composer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $add_person() swapped;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _composer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $add_person() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -92,20 +95,22 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox instrument_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
margin-bottom: 24;
|
||||
Gtk.Box instruments_box {
|
||||
Gtk.ListBox instrument_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
hexpand: true;
|
||||
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
styles [
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _instrument");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $add_instrument() swapped;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _instrument");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $add_instrument() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ mod imp {
|
|||
#[template_child]
|
||||
pub name_editor: TemplateChild<TranslationEditor>,
|
||||
#[template_child]
|
||||
pub recordings_list: TemplateChild<gtk::ListBox>,
|
||||
pub recordings_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub select_recording_box: TemplateChild<gtk::Box>,
|
||||
pub recordings_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub save_row: TemplateChild<adw::ButtonRow>,
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ mod imp {
|
|||
obj.navigation().push(&editor);
|
||||
});
|
||||
|
||||
self.select_recording_box.append(&recordings_popover);
|
||||
self.recordings_box.append(&recordings_popover);
|
||||
self.recordings_popover.set(recordings_popover).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,14 +49,14 @@ mod imp {
|
|||
#[template_child]
|
||||
pub year_row: TemplateChild<adw::SpinRow>,
|
||||
#[template_child]
|
||||
pub performers_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub performer_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub select_person_box: TemplateChild<gtk::Box>,
|
||||
pub ensembles_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub ensemble_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub select_ensemble_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub save_row: TemplateChild<adw::ButtonRow>,
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ mod imp {
|
|||
obj.navigation().push(&editor);
|
||||
});
|
||||
|
||||
self.select_person_box.append(&persons_popover);
|
||||
self.performers_box.append(&persons_popover);
|
||||
self.persons_popover.set(persons_popover).unwrap();
|
||||
|
||||
let ensembles_popover = EnsembleSelectorPopover::new(self.library.get().unwrap());
|
||||
|
|
@ -165,7 +165,7 @@ mod imp {
|
|||
obj.navigation().push(&editor);
|
||||
});
|
||||
|
||||
self.select_ensemble_box.append(&ensembles_popover);
|
||||
self.ensembles_box.append(&ensembles_popover);
|
||||
self.ensembles_popover.set(ensembles_popover).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,15 +50,15 @@ mod imp {
|
|||
#[template_child]
|
||||
pub name_editor: TemplateChild<TranslationEditor>,
|
||||
#[template_child]
|
||||
pub composer_list: TemplateChild<gtk::ListBox>,
|
||||
pub composers_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub select_person_box: TemplateChild<gtk::Box>,
|
||||
pub composer_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub part_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub instrument_list: TemplateChild<gtk::ListBox>,
|
||||
pub instruments_box: TemplateChild<gtk::Box>,
|
||||
#[template_child]
|
||||
pub select_instrument_box: TemplateChild<gtk::Box>,
|
||||
pub instrument_list: TemplateChild<gtk::ListBox>,
|
||||
#[template_child]
|
||||
pub save_row: TemplateChild<adw::ButtonRow>,
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ mod imp {
|
|||
obj.navigation().push(&editor);
|
||||
});
|
||||
|
||||
self.select_person_box.append(&persons_popover);
|
||||
self.composers_box.append(&persons_popover);
|
||||
self.persons_popover.set(persons_popover).unwrap();
|
||||
|
||||
let instruments_popover = InstrumentSelectorPopover::new(self.library.get().unwrap());
|
||||
|
|
@ -142,7 +142,7 @@ mod imp {
|
|||
obj.navigation().push(&editor);
|
||||
});
|
||||
|
||||
self.select_instrument_box.append(&instruments_popover);
|
||||
self.instruments_box.append(&instruments_popover);
|
||||
self.instruments_popover.set(instruments_popover).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue