From 43ea088f646a8b3a5c41699f48cf5f0b4e7d4107 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 8 Feb 2022 21:57:48 +0100 Subject: Calls: Device picker --- main/src/ui/call_window/video_settings_popover.vala | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'main/src/ui/call_window/video_settings_popover.vala') diff --git a/main/src/ui/call_window/video_settings_popover.vala b/main/src/ui/call_window/video_settings_popover.vala index 332bd917..553fc270 100644 --- a/main/src/ui/call_window/video_settings_popover.vala +++ b/main/src/ui/call_window/video_settings_popover.vala @@ -22,17 +22,21 @@ public class Dino.Ui.VideoSettingsPopover : Gtk.Popover { Gee.List devices = call_plugin.get_devices("video", false); Box camera_box = new Box(Orientation.VERTICAL, 10) { visible=true }; - camera_box.add(new Label("" + "Cameras" + "") { use_markup=true, xalign=0, visible=true, can_focus=true /* grab initial focus*/ }); + camera_box.add(new Label("" + _("Cameras") + "") { use_markup=true, xalign=0, visible=true, can_focus=true /* grab initial focus*/ }); if (devices.size == 0) { - camera_box.add(new Label("No cameras found.") { visible=true }); + camera_box.add(new Label(_("No cameras found.")) { visible=true }); } else { ListBox list_box = new ListBox() { activate_on_single_click=true, selection_mode=SelectionMode.SINGLE, visible=true }; list_box.set_header_func(listbox_header_func); Frame frame = new Frame(null) { visible=true }; frame.add(list_box); foreach (Plugins.MediaDevice device in devices) { - Label label = new Label(device.display_name) { xalign=0, visible=true }; + Label display_name_label = new Label(device.display_name) { xalign=0, visible=true }; + Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; + detail_name_label.get_style_context().add_class("dim-label"); + detail_name_label.attributes = new Pango.AttrList(); + detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); Image image = new Image.from_icon_name("object-select-symbolic", IconSize.BUTTON) { visible=true }; if (current_device == null || current_device.id != device.id) { image.opacity = 0; @@ -46,7 +50,10 @@ public class Dino.Ui.VideoSettingsPopover : Gtk.Popover { }); Box device_box = new Box(Orientation.HORIZONTAL, 0) { spacing=7, margin=7, visible=true }; device_box.add(image); - device_box.add(label); + Box label_box = new Box(Orientation.VERTICAL, 0) { visible = true }; + label_box.add(display_name_label); + label_box.add(detail_name_label); + device_box.add(label_box); ListBoxRow list_box_row = new ListBoxRow() { visible=true }; list_box_row.add(device_box); list_box.add(list_box_row); -- cgit v1.2.3-54-g00ecf