2024-04-01 16:57:34 +02:00
using Gtk 4.0;
using Adw 1;
2024-05-31 13:39:27 +02:00
template $MusicusTranslationEntry: Adw.EntryRow {
2024-04-01 16:57:34 +02:00
title: _("Translated name");
Gtk.Button {
2024-05-31 13:39:27 +02:00
icon-name: "user-trash-symbolic";
2024-04-01 16:57:34 +02:00
valign: center;
clicked => $remove() swapped;
2024-05-31 13:39:27 +02:00
styles [
"flat"
]
2024-04-01 16:57:34 +02:00
}
Gtk.Button {
valign: center;
clicked => $open_lang_popover() swapped;
2024-05-31 13:39:27 +02:00
styles [
"flat"
]
2024-04-01 16:57:34 +02:00
Gtk.Box {
spacing: 6;
Gtk.Label {
label: bind lang_entry.text;
}
Gtk.Image {
icon-name: "pan-down-symbolic";
}
Gtk.Popover lang_popover {
Gtk.Box {
orientation: vertical;
spacing: 6;
margin-start: 6;
margin-end: 6;
margin-top: 6;
margin-bottom: 6;
Gtk.Label {
label: _("Language code");
halign: start;
2024-05-31 13:39:27 +02:00
styles [
"heading"
]
2024-04-01 16:57:34 +02:00
}
Gtk.Label {
width-request: 200;
label: _("Enter an <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes\">ISO 639</a> two-letter language code identifying the language this translation uses.");
use-markup: true;
wrap: true;
max-width-chars: 40;
halign: start;
2024-05-31 13:39:27 +02:00
styles [
"dim-label"
]
2024-04-01 16:57:34 +02:00
}
Gtk.Entry lang_entry {}
}
}
}
}
2024-05-31 13:39:27 +02:00
}