Improve a11y and consistency for info popover
This commit is contained in:
@@ -129,17 +129,19 @@ template $DetailsWindow : Adw.Window {
|
|||||||
icon-name: "help-about-symbolic";
|
icon-name: "help-about-symbolic";
|
||||||
tooltip-text: _("More Info");
|
tooltip-text: _("More Info");
|
||||||
|
|
||||||
popover: Popover {
|
popover: Popover exec_info_popover {
|
||||||
visible: bind-property exec_info_button.active bidirectional;
|
|
||||||
|
|
||||||
Label exec_info_label {
|
Label exec_info_label {
|
||||||
use-markup: true;
|
use-markup: true;
|
||||||
wrap: true;
|
wrap: true;
|
||||||
max-width-chars: 30;
|
max-width-chars: 50;
|
||||||
|
halign: center;
|
||||||
|
valign: center;
|
||||||
margin-top: 6;
|
margin-top: 6;
|
||||||
margin-bottom: 12;
|
margin-bottom: 6;
|
||||||
margin-start: 6;
|
margin-start: 6;
|
||||||
margin-end: 6;
|
margin-end: 6;
|
||||||
|
selectable: true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class DetailsWindow(Adw.Window):
|
|||||||
executable = Gtk.Template.Child()
|
executable = Gtk.Template.Child()
|
||||||
|
|
||||||
exec_info_label = Gtk.Template.Child()
|
exec_info_label = Gtk.Template.Child()
|
||||||
|
exec_info_popover = Gtk.Template.Child()
|
||||||
|
|
||||||
apply_button = Gtk.Template.Child()
|
apply_button = Gtk.Template.Child()
|
||||||
|
|
||||||
@@ -112,6 +113,11 @@ class DetailsWindow(Adw.Window):
|
|||||||
|
|
||||||
self.exec_info_label.set_label(exec_info_text)
|
self.exec_info_label.set_label(exec_info_text)
|
||||||
|
|
||||||
|
def clear_info_selection(*_args):
|
||||||
|
self.exec_info_label.select_region(0, 0)
|
||||||
|
|
||||||
|
self.exec_info_popover.connect("show", clear_info_selection)
|
||||||
|
|
||||||
self.cover_button_delete.connect("clicked", self.delete_pixbuf)
|
self.cover_button_delete.connect("clicked", self.delete_pixbuf)
|
||||||
self.cover_button_edit.connect("clicked", self.choose_cover)
|
self.cover_button_edit.connect("clicked", self.choose_cover)
|
||||||
self.apply_button.connect("clicked", self.apply_preferences)
|
self.apply_button.connect("clicked", self.apply_preferences)
|
||||||
|
|||||||
Reference in New Issue
Block a user