mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Replace most unnecessary frames with CSS classes
This commit is contained in:
parent
f2d99d2316
commit
3ae5727f39
24 changed files with 328 additions and 376 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkBox" id="widget">
|
<object class="GtkBox" id="widget">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -41,89 +41,97 @@
|
||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
<property name="label" translatable="yes">Matching metadata</property>
|
<property name="label" translatable="yes">Matching metadata</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkStack" id="matching_stack">
|
||||||
|
<property name="transition-type">crossfade</property>
|
||||||
|
<property name="vhomogeneous">false</property>
|
||||||
|
<property name="interpolate-size">true</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="matching_stack">
|
<object class="GtkStackPage">
|
||||||
<property name="transition-type">crossfade</property>
|
<property name="name">loading</property>
|
||||||
<property name="vhomogeneous">false</property>
|
<property name="child">
|
||||||
<property name="interpolate-size">true</property>
|
<object class="GtkListBox">
|
||||||
<child>
|
<property name="selection-mode">none</property>
|
||||||
<object class="GtkStackPage">
|
<child>
|
||||||
<property name="name">loading</property>
|
<object class="AdwActionRow">
|
||||||
<property name="child">
|
<property name="activatable">False</property>
|
||||||
<object class="GtkListBox">
|
<property name="title" translatable="yes">Loading…</property>
|
||||||
<property name="selection-mode">none</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow">
|
<object class="GtkSpinner">
|
||||||
<property name="activatable">False</property>
|
<property name="spinning">True</property>
|
||||||
<property name="title" translatable="yes">Loading…</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinner">
|
|
||||||
<property name="spinning">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="GtkStackPage">
|
</child>
|
||||||
<property name="name">error</property>
|
<child>
|
||||||
<property name="child">
|
<object class="GtkStackPage">
|
||||||
<object class="GtkListBox">
|
<property name="name">error</property>
|
||||||
<property name="selection-mode">none</property>
|
<property name="child">
|
||||||
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow" id="error_row">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Error while searching for matching metadata</property>
|
||||||
|
<property name="activatable-widget">try_again_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="error_row">
|
<object class="GtkButton" id="try_again_button">
|
||||||
<property name="focusable">False</property>
|
<property name="icon-name">view-refresh-symbolic</property>
|
||||||
<property name="title" translatable="yes">Error while searching for matching metadata</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">try_again_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="try_again_button">
|
|
||||||
<property name="icon-name">view-refresh-symbolic</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="GtkStackPage">
|
</child>
|
||||||
<property name="name">empty</property>
|
<child>
|
||||||
<property name="child">
|
<object class="GtkStackPage">
|
||||||
<object class="GtkListBox">
|
<property name="name">empty</property>
|
||||||
<property name="selection-mode">none</property>
|
<property name="child">
|
||||||
<child>
|
<object class="GtkListBox">
|
||||||
<object class="AdwActionRow">
|
<property name="selection-mode">none</property>
|
||||||
<property name="activatable">False</property>
|
<child>
|
||||||
<property name="title" translatable="yes">No matching metadata found</property>
|
<object class="AdwActionRow">
|
||||||
</object>
|
<property name="activatable">False</property>
|
||||||
</child>
|
<property name="title" translatable="yes">No matching metadata found</property>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
<child>
|
</object>
|
||||||
<object class="GtkStackPage">
|
</child>
|
||||||
<property name="name">content</property>
|
<child>
|
||||||
<property name="child">
|
<object class="GtkStackPage">
|
||||||
<object class="GtkListBox" id="matching_list">
|
<property name="name">content</property>
|
||||||
<property name="selection-mode">none</property>
|
<property name="child">
|
||||||
</object>
|
<object class="GtkListBox" id="matching_list">
|
||||||
</property>
|
<property name="selection-mode">none</property>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
@ -135,43 +143,42 @@
|
||||||
<property name="margin-bottom">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="label" translatable="yes">Manually add metadata</property>
|
<property name="label" translatable="yes">Manually add metadata</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select existing medium</property>
|
||||||
|
<property name="activatable-widget">select_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow">
|
<object class="GtkButton" id="select_button">
|
||||||
<property name="focusable">False</property>
|
<property name="label" translatable="yes">Select</property>
|
||||||
<property name="title" translatable="yes">Select existing medium</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">select_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="select_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwActionRow">
|
|
||||||
<property name="focusable">False</property>
|
|
||||||
<property name="title" translatable="yes">Add a new medium</property>
|
|
||||||
<property name="activatable-widget">add_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="add_button">
|
|
||||||
<property name="label" translatable="yes">Add</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Add a new medium</property>
|
||||||
|
<property name="activatable-widget">add_button</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="add_button">
|
||||||
|
<property name="label" translatable="yes">Add</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkStack" id="widget">
|
<object class="GtkStack" id="widget">
|
||||||
<property name="transition-type">crossfade</property>
|
<property name="transition-type">crossfade</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Import music</property>
|
<property name="label" translatable="yes">Import music</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<object class="GtkButton" id="done_button">
|
<object class="GtkButton" id="done_button">
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -60,30 +60,29 @@
|
||||||
<property name="margin-bottom">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="label" translatable="yes">Medium</property>
|
<property name="label" translatable="yes">Medium</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow" id="name_row">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Name of the medium</property>
|
||||||
|
<property name="activatable-widget">name_entry</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="name_row">
|
<object class="GtkEntry" id="name_entry">
|
||||||
<property name="focusable">False</property>
|
<property name="valign">center</property>
|
||||||
<property name="title" translatable="yes">Name of the medium</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="activatable-widget">name_entry</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="name_entry">
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -98,7 +97,7 @@
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="label" translatable="yes">Recordings</property>
|
<property name="label" translatable="yes">Recordings</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -111,7 +110,7 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="frame"/>
|
<object class="GtkFrame" id="frame" />
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkBox" id="widget">
|
<object class="GtkBox" id="widget">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -12,13 +12,13 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Performance</property>
|
<property name="label" translatable="yes">Performance</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="back_button">
|
<object class="GtkButton" id="back_button">
|
||||||
<property name="icon-name">go-previous-symbolic</property>
|
<property name="icon-name">go-previous-symbolic</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="end">
|
<child type="end">
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -44,59 +44,57 @@
|
||||||
<property name="maximum-size">500</property>
|
<property name="maximum-size">500</property>
|
||||||
<property name="tightening-threshold">300</property>
|
<property name="tightening-threshold">300</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
<property name="valign">start</property>
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow" id="person_row">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select a person</property>
|
||||||
|
<property name="activatable-widget">person_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="person_row">
|
<object class="GtkButton" id="person_button">
|
||||||
<property name="focusable">False</property>
|
<property name="label" translatable="yes">Select</property>
|
||||||
<property name="title" translatable="yes">Select a person</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">person_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="person_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwActionRow" id="ensemble_row">
|
|
||||||
<property name="focusable">False</property>
|
|
||||||
<property name="title" translatable="yes">Select an ensemble</property>
|
|
||||||
<property name="activatable-widget">ensemble_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="ensemble_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwActionRow" id="role_row">
|
|
||||||
<property name="focusable">False</property>
|
|
||||||
<property name="title" translatable="yes">Select a role</property>
|
|
||||||
<property name="activatable-widget">role_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="reset_role_button">
|
|
||||||
<property name="visible">false</property>
|
|
||||||
<property name="icon-name">user-trash-symbolic</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="role_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow" id="ensemble_row">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select an ensemble</property>
|
||||||
|
<property name="activatable-widget">ensemble_button</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="ensemble_button">
|
||||||
|
<property name="label" translatable="yes">Select</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow" id="role_row">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select a role</property>
|
||||||
|
<property name="activatable-widget">role_button</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="reset_role_button">
|
||||||
|
<property name="visible">false</property>
|
||||||
|
<property name="icon-name">user-trash-symbolic</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="role_button">
|
||||||
|
<property name="label" translatable="yes">Select</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
<property name="margin-bottom">12</property>
|
<property name="margin-bottom">12</property>
|
||||||
<property name="maximum-size">800</property>
|
<property name="maximum-size">800</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox" id="content">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">12</property>
|
<property name="spacing">12</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -144,10 +144,6 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkFrame" id="frame">
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkStack" id="widget">
|
<object class="GtkStack" id="widget">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStackPage">
|
<object class="GtkStackPage">
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Recording</property>
|
<property name="label" translatable="yes">Recording</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="back_button">
|
<object class="GtkButton" id="back_button">
|
||||||
<property name="icon-name">go-previous-symbolic</property>
|
<property name="icon-name">go-previous-symbolic</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="end">
|
<child type="end">
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -64,43 +64,42 @@
|
||||||
<property name="margin-bottom">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="label" translatable="yes">Overview</property>
|
<property name="label" translatable="yes">Overview</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow" id="work_row">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select a work</property>
|
||||||
|
<property name="activatable-widget">work_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="work_row">
|
<object class="GtkButton" id="work_button">
|
||||||
<property name="focusable">False</property>
|
<property name="label" translatable="yes">Select</property>
|
||||||
<property name="title" translatable="yes">Select a work</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">work_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="work_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwActionRow">
|
|
||||||
<property name="focusable">False</property>
|
|
||||||
<property name="title" translatable="yes">Comment</property>
|
|
||||||
<property name="activatable-widget">comment_entry</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="comment_entry">
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Comment</property>
|
||||||
|
<property name="activatable-widget">comment_entry</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="comment_entry">
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -115,7 +114,7 @@
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="label" translatable="yes">Performers</property>
|
<property name="label" translatable="yes">Performers</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -128,7 +127,7 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="performance_frame"/>
|
<object class="GtkFrame" id="performance_frame" />
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -154,7 +153,7 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Recording</property>
|
<property name="label" translatable="yes">Recording</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,5 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkFrame" id="frame"/>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
|
||||||
|
|
@ -93,18 +93,13 @@
|
||||||
<property name="height-request">200</property>
|
<property name="height-request">200</property>
|
||||||
<property name="vexpand">true</property>
|
<property name="vexpand">true</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwClamp">
|
<object class="AdwClamp" id="clamp">
|
||||||
<property name="maximum-size">500</property>
|
<property name="maximum-size">500</property>
|
||||||
<property name="tightening-threshold">300</property>
|
<property name="tightening-threshold">300</property>
|
||||||
<child>
|
<property name="margin-start">6</property>
|
||||||
<object class="GtkFrame" id="frame">
|
<property name="margin-end">6</property>
|
||||||
<property name="valign">start</property>
|
<property name="margin-top">12</property>
|
||||||
<property name="margin-start">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="margin-end">6</property>
|
|
||||||
<property name="margin-top">12</property>
|
|
||||||
<property name="margin-bottom">6</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkBox" id="widget">
|
<object class="GtkBox" id="widget">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Track</property>
|
<property name="label" translatable="yes">Track</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<object class="GtkButton" id="select_button">
|
<object class="GtkButton" id="select_button">
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -35,16 +35,11 @@
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwClamp">
|
<object class="AdwClamp" id="clamp">
|
||||||
<child>
|
<property name="margin-top">12</property>
|
||||||
<object class="GtkFrame" id="parts_frame">
|
<property name="margin-start">6</property>
|
||||||
<property name="valign">start</property>
|
<property name="margin-end">6</property>
|
||||||
<property name="margin-top">12</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="margin-start">6</property>
|
|
||||||
<property name="margin-end">6</property>
|
|
||||||
<property name="margin-bottom">6</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -36,16 +36,11 @@
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwClamp">
|
<object class="AdwClamp" id="clamp">
|
||||||
<child>
|
<property name="margin-top">12</property>
|
||||||
<object class="GtkFrame" id="tracks_frame">
|
<property name="margin-start">6</property>
|
||||||
<property name="valign">start</property>
|
<property name="margin-end">6</property>
|
||||||
<property name="margin-top">12</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="margin-start">6</property>
|
|
||||||
<property name="margin-end">6</property>
|
|
||||||
<property name="margin-bottom">6</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkBox" id="widget">
|
<object class="GtkBox" id="widget">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Import music</property>
|
<property name="label" translatable="yes">Import music</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<property name="sensitive">False</property>
|
<property name="sensitive">False</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -50,30 +50,29 @@
|
||||||
<property name="margin-bottom">6</property>
|
<property name="margin-bottom">6</property>
|
||||||
<property name="label" translatable="yes">Recording</property>
|
<property name="label" translatable="yes">Recording</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow" id="recording_row">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select a recording</property>
|
||||||
|
<property name="activatable-widget">select_recording_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="recording_row">
|
<object class="GtkButton" id="select_recording_button">
|
||||||
<property name="focusable">False</property>
|
<property name="label" translatable="yes">Select</property>
|
||||||
<property name="title" translatable="yes">Select a recording</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">select_recording_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="select_recording_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -88,7 +87,7 @@
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="label" translatable="yes">Tracks</property>
|
<property name="label" translatable="yes">Tracks</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold" />
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -101,7 +100,7 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="tracks_frame"/>
|
<object class="GtkFrame" id="tracks_frame" />
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
||||||
|
|
@ -69,38 +69,37 @@
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow" id="composer_row">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Select a composer</property>
|
||||||
|
<property name="activatable-widget">composer_button</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow" id="composer_row">
|
<object class="GtkButton" id="composer_button">
|
||||||
<property name="focusable">False</property>
|
<property name="label" translatable="yes">Select</property>
|
||||||
<property name="title" translatable="yes">Select a composer</property>
|
<property name="valign">center</property>
|
||||||
<property name="activatable-widget">composer_button</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="composer_button">
|
|
||||||
<property name="label" translatable="yes">Select</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="AdwActionRow">
|
|
||||||
<property name="focusable">False</property>
|
|
||||||
<property name="title" translatable="yes">Title</property>
|
|
||||||
<property name="activatable-widget">title_entry</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="title_entry">
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwActionRow">
|
||||||
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Title</property>
|
||||||
|
<property name="activatable-widget">title_entry</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="title_entry">
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk" version="4.0"/>
|
<requires lib="gtk" version="4.0" />
|
||||||
<requires lib="libadwaita" version="1.0"/>
|
<requires lib="libadwaita" version="1.0" />
|
||||||
<object class="GtkBox" id="widget">
|
<object class="GtkBox" id="widget">
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Work part</property>
|
<property name="label" translatable="yes">Work part</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="title"/>
|
<class name="title" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<object class="GtkButton" id="save_button">
|
<object class="GtkButton" id="save_button">
|
||||||
<property name="icon-name">object-select-symbolic</property>
|
<property name="icon-name">object-select-symbolic</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="suggested-action"/>
|
<class name="suggested-action" />
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
@ -48,26 +48,24 @@
|
||||||
<property name="maximum-size">500</property>
|
<property name="maximum-size">500</property>
|
||||||
<property name="tightening-threshold">300</property>
|
<property name="tightening-threshold">300</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame">
|
<object class="GtkListBox">
|
||||||
<property name="valign">start</property>
|
<property name="selection-mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox">
|
<object class="AdwActionRow">
|
||||||
<property name="selection-mode">none</property>
|
<property name="focusable">False</property>
|
||||||
|
<property name="title" translatable="yes">Title</property>
|
||||||
|
<property name="activatable-widget">title_entry</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow">
|
<object class="GtkEntry" id="title_entry">
|
||||||
<property name="focusable">False</property>
|
<property name="valign">center</property>
|
||||||
<property name="title" translatable="yes">Title</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="activatable-widget">title_entry</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="title_entry">
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="boxed-list" />
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ impl Screen<Option<Ensemble>, Ensemble> for EnsembleEditor {
|
||||||
|
|
||||||
let list = gtk::ListBoxBuilder::new()
|
let list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let name = EntryRow::new(&gettext("Name"));
|
let name = EntryRow::new(&gettext("Name"));
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ impl Screen<Option<Instrument>, Instrument> for InstrumentEditor {
|
||||||
|
|
||||||
let list = gtk::ListBoxBuilder::new()
|
let list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let name = EntryRow::new(&gettext("Name"));
|
let name = EntryRow::new(&gettext("Name"));
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ impl Screen<Option<Performance>, Performance> for PerformanceEditor {
|
||||||
|
|
||||||
let performer_list = gtk::ListBoxBuilder::new()
|
let performer_list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let person_row = ButtonRow::new("Person", "Select");
|
let person_row = ButtonRow::new("Person", "Select");
|
||||||
|
|
@ -46,6 +47,7 @@ impl Screen<Option<Performance>, Performance> for PerformanceEditor {
|
||||||
|
|
||||||
let role_list = gtk::ListBoxBuilder::new()
|
let role_list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let reset_role_button = gtk::ButtonBuilder::new()
|
let reset_role_button = gtk::ButtonBuilder::new()
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ impl Screen<Option<Person>, Person> for PersonEditor {
|
||||||
|
|
||||||
let list = gtk::ListBoxBuilder::new()
|
let list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let first_name = EntryRow::new(&gettext("First name"));
|
let first_name = EntryRow::new(&gettext("First name"));
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,8 @@ impl MediumPreview {
|
||||||
|
|
||||||
let list = gtk::ListBoxBuilder::new()
|
let list = gtk::ListBoxBuilder::new()
|
||||||
.selection_mode(gtk::SelectionMode::None)
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.margin_bottom(12)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let header = adw::ActionRowBuilder::new()
|
let header = adw::ActionRowBuilder::new()
|
||||||
|
|
@ -152,10 +154,7 @@ impl MediumPreview {
|
||||||
list.append(&header);
|
list.append(&header);
|
||||||
|
|
||||||
if let Some(list) = &last_list {
|
if let Some(list) = &last_list {
|
||||||
let frame = gtk::FrameBuilder::new().margin_bottom(12).build();
|
self.medium_box.append(list);
|
||||||
|
|
||||||
frame.set_child(Some(list));
|
|
||||||
self.medium_box.append(&frame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
last_list = Some(list);
|
last_list = Some(list);
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,14 @@ impl Screen<(Recording, Vec<usize>), Vec<usize>> for TrackEditor {
|
||||||
get_widget!(builder, gtk::Box, widget);
|
get_widget!(builder, gtk::Box, widget);
|
||||||
get_widget!(builder, gtk::Button, back_button);
|
get_widget!(builder, gtk::Button, back_button);
|
||||||
get_widget!(builder, gtk::Button, select_button);
|
get_widget!(builder, gtk::Button, select_button);
|
||||||
get_widget!(builder, gtk::Frame, parts_frame);
|
get_widget!(builder, adw::Clamp, clamp);
|
||||||
|
|
||||||
let parts_list = gtk::ListBox::new();
|
let parts_list = gtk::ListBoxBuilder::new()
|
||||||
parts_list.set_selection_mode(gtk::SelectionMode::None);
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
parts_list.set_vexpand(false);
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
parts_list.show();
|
.build();
|
||||||
parts_frame.set_child(Some(&parts_list));
|
|
||||||
|
clamp.set_child(Some(&parts_list));
|
||||||
|
|
||||||
let this = Rc::new(Self {
|
let this = Rc::new(Self {
|
||||||
handle,
|
handle,
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,14 @@ impl Screen<Arc<ImportSession>, Vec<usize>> for TrackSelector {
|
||||||
get_widget!(builder, gtk::Box, widget);
|
get_widget!(builder, gtk::Box, widget);
|
||||||
get_widget!(builder, gtk::Button, back_button);
|
get_widget!(builder, gtk::Button, back_button);
|
||||||
get_widget!(builder, gtk::Button, select_button);
|
get_widget!(builder, gtk::Button, select_button);
|
||||||
get_widget!(builder, gtk::Frame, tracks_frame);
|
get_widget!(builder, adw::Clamp, clamp);
|
||||||
|
|
||||||
let track_list = gtk::ListBox::new();
|
let track_list = gtk::ListBoxBuilder::new()
|
||||||
track_list.set_selection_mode(gtk::SelectionMode::None);
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
track_list.set_vexpand(false);
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
track_list.show();
|
.build();
|
||||||
tracks_frame.set_child(Some(&track_list));
|
|
||||||
|
clamp.set_child(Some(&track_list));
|
||||||
|
|
||||||
let this = Rc::new(Self {
|
let this = Rc::new(Self {
|
||||||
handle,
|
handle,
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ impl Screen<(), ()> for MainScreen {
|
||||||
widget.insert_action_group("widget", Some(&actions));
|
widget.insert_action_group("widget", Some(&actions));
|
||||||
|
|
||||||
let poe_list = List::new();
|
let poe_list = List::new();
|
||||||
poe_list.widget.add_css_class("navigation-sidebar");
|
poe_list.widget.set_css_classes(&["navigation-sidebar"]);
|
||||||
poe_list.enable_selection();
|
poe_list.enable_selection();
|
||||||
|
|
||||||
let navigator = Navigator::new(Rc::clone(&handle.backend), &handle.window, &empty_screen);
|
let navigator = Navigator::new(Rc::clone(&handle.backend), &handle.window, &empty_screen);
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,17 @@ use musicus_backend::db::Track;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
/// Elements for visually representing the playlist.
|
/// A playable track within the playlist.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
enum ListItem {
|
struct ListItem {
|
||||||
/// A playable track.
|
/// Index within the playlist.
|
||||||
Track {
|
index: usize,
|
||||||
/// Index within the playlist.
|
|
||||||
index: usize,
|
|
||||||
|
|
||||||
/// Whether this is the first track of the recording.
|
/// Whether this is the first track of the recording.
|
||||||
first: bool,
|
first: bool,
|
||||||
|
|
||||||
/// Whether this is the currently played track.
|
/// Whether this is the currently played track.
|
||||||
playing: bool,
|
playing: bool,
|
||||||
},
|
|
||||||
|
|
||||||
/// A separator shown between recordings.
|
|
||||||
Separator,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct PlayerScreen {
|
pub struct PlayerScreen {
|
||||||
|
|
@ -52,6 +46,7 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
|
|
||||||
get_widget!(builder, gtk::Box, widget);
|
get_widget!(builder, gtk::Box, widget);
|
||||||
get_widget!(builder, gtk::Button, back_button);
|
get_widget!(builder, gtk::Button, back_button);
|
||||||
|
get_widget!(builder, gtk::Box, content);
|
||||||
get_widget!(builder, gtk::Label, title_label);
|
get_widget!(builder, gtk::Label, title_label);
|
||||||
get_widget!(builder, gtk::Label, subtitle_label);
|
get_widget!(builder, gtk::Label, subtitle_label);
|
||||||
get_widget!(builder, gtk::Button, previous_button);
|
get_widget!(builder, gtk::Button, previous_button);
|
||||||
|
|
@ -64,10 +59,9 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
get_widget!(builder, gtk::Label, duration_label);
|
get_widget!(builder, gtk::Label, duration_label);
|
||||||
get_widget!(builder, gtk::Image, play_image);
|
get_widget!(builder, gtk::Image, play_image);
|
||||||
get_widget!(builder, gtk::Image, pause_image);
|
get_widget!(builder, gtk::Image, pause_image);
|
||||||
get_widget!(builder, gtk::Frame, frame);
|
|
||||||
|
|
||||||
let list = List::new();
|
let list = List::new();
|
||||||
frame.set_child(Some(&list.widget));
|
content.append(&list.widget);
|
||||||
|
|
||||||
let event_controller = gtk::EventControllerLegacy::new();
|
let event_controller = gtk::EventControllerLegacy::new();
|
||||||
position_scale.add_controller(&event_controller);
|
position_scale.add_controller(&event_controller);
|
||||||
|
|
@ -209,22 +203,9 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
|
|
||||||
this.list
|
this.list
|
||||||
.set_make_widget_cb(clone!(@weak this => @default-panic, move |index| {
|
.set_make_widget_cb(clone!(@weak this => @default-panic, move |index| {
|
||||||
let widget = match this.items.borrow()[index] {
|
let item = &this.items.borrow()[index];
|
||||||
ListItem::Track {index, first, playing} => {
|
let track = &this.playlist.borrow()[item.index];
|
||||||
let track = &this.playlist.borrow()[index];
|
TrackRow::new(track, item.first, item.playing).get_widget()
|
||||||
TrackRow::new(track, first, playing).get_widget()
|
|
||||||
}
|
|
||||||
ListItem::Separator => {
|
|
||||||
gtk::ListBoxRowBuilder::new()
|
|
||||||
.selectable(false)
|
|
||||||
.activatable(false)
|
|
||||||
.child(>k::Separator::new(gtk::Orientation::Horizontal))
|
|
||||||
.build()
|
|
||||||
.upcast()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
widget
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.list
|
this.list
|
||||||
|
|
@ -232,9 +213,7 @@ impl Screen<(), ()> for PlayerScreen {
|
||||||
.connect_row_activated(clone!(@weak this => move |_, row| {
|
.connect_row_activated(clone!(@weak this => move |_, row| {
|
||||||
let list_index = row.index();
|
let list_index = row.index();
|
||||||
let list_item = this.items.borrow()[list_index as usize].clone();
|
let list_item = this.items.borrow()[list_index as usize].clone();
|
||||||
if let ListItem::Track {index, ..} = list_item {
|
this.handle.backend.pl().set_track(list_item.index).unwrap();
|
||||||
this.handle.backend.pl().set_track(index).unwrap();
|
|
||||||
};
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
player.send_data();
|
player.send_data();
|
||||||
|
|
@ -249,33 +228,22 @@ impl PlayerScreen {
|
||||||
let playlist = self.playlist.borrow();
|
let playlist = self.playlist.borrow();
|
||||||
let current_track = self.current_track.get();
|
let current_track = self.current_track.get();
|
||||||
|
|
||||||
let mut first = true;
|
|
||||||
let mut items = Vec::new();
|
let mut items = Vec::new();
|
||||||
|
|
||||||
let mut last_recording_id = "";
|
let mut last_recording_id = "";
|
||||||
|
|
||||||
for (index, track) in playlist.iter().enumerate() {
|
for (index, track) in playlist.iter().enumerate() {
|
||||||
let first_track = if track.recording.id != last_recording_id {
|
let first_track = if track.recording.id != last_recording_id {
|
||||||
last_recording_id = &track.recording.id;
|
last_recording_id = &track.recording.id;
|
||||||
|
|
||||||
if !first {
|
|
||||||
items.push(ListItem::Separator);
|
|
||||||
} else {
|
|
||||||
first = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
let item = ListItem::Track {
|
items.push(ListItem {
|
||||||
index,
|
index,
|
||||||
first: first_track,
|
first: first_track,
|
||||||
playing: index == current_track,
|
playing: index == current_track,
|
||||||
};
|
});
|
||||||
|
|
||||||
items.push(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let length = items.len();
|
let length = items.len();
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,10 @@ impl<T> Selector<T> {
|
||||||
get_widget!(builder, gtk::Button, add_button);
|
get_widget!(builder, gtk::Button, add_button);
|
||||||
get_widget!(builder, gtk::SearchEntry, search_entry);
|
get_widget!(builder, gtk::SearchEntry, search_entry);
|
||||||
get_widget!(builder, gtk::Stack, stack);
|
get_widget!(builder, gtk::Stack, stack);
|
||||||
get_widget!(builder, gtk::Frame, frame);
|
get_widget!(builder, adw::Clamp, clamp);
|
||||||
|
|
||||||
let list = List::new();
|
let list = List::new();
|
||||||
frame.set_child(Some(&list.widget));
|
clamp.set_child(Some(&list.widget));
|
||||||
|
|
||||||
let this = Rc::new(Self {
|
let this = Rc::new(Self {
|
||||||
widget,
|
widget,
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,10 @@ impl List {
|
||||||
// let factory = gtk::SignalListItemFactory::new();
|
// let factory = gtk::SignalListItemFactory::new();
|
||||||
// let widget = gtk::ListView::new(Some(&selection), Some(&factory));
|
// let widget = gtk::ListView::new(Some(&selection), Some(&factory));
|
||||||
|
|
||||||
let widget = gtk::ListBox::new();
|
let widget = gtk::ListBoxBuilder::new()
|
||||||
widget.set_selection_mode(gtk::SelectionMode::None);
|
.selection_mode(gtk::SelectionMode::None)
|
||||||
|
.css_classes(vec![String::from("boxed-list")])
|
||||||
|
.build();
|
||||||
|
|
||||||
let this = Rc::new(Self {
|
let this = Rc::new(Self {
|
||||||
widget,
|
widget,
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,9 @@ impl Section {
|
||||||
get_widget!(builder, gtk::Box, title_box);
|
get_widget!(builder, gtk::Box, title_box);
|
||||||
get_widget!(builder, gtk::Label, title_label);
|
get_widget!(builder, gtk::Label, title_label);
|
||||||
get_widget!(builder, gtk::Label, subtitle_label);
|
get_widget!(builder, gtk::Label, subtitle_label);
|
||||||
get_widget!(builder, gtk::Frame, frame);
|
|
||||||
|
|
||||||
title_label.set_label(title);
|
title_label.set_label(title);
|
||||||
frame.set_child(Some(&content.get_widget()));
|
widget.append(&content.get_widget());
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
widget,
|
widget,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue