From f44cbe02c17df1f02ad49c63cd784fec0ea02d85 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 14 May 2022 14:45:59 +0200 Subject: Improve Gtk4 port --- .../src/ui/call_window/video_settings_popover.vala | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 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 c931c466..58967bd2 100644 --- a/main/src/ui/call_window/video_settings_popover.vala +++ b/main/src/ui/call_window/video_settings_popover.vala @@ -11,7 +11,7 @@ public class Dino.Ui.VideoSettingsPopover : Gtk.Popover { private HashMap row_device = new HashMap(); public VideoSettingsPopover() { - Box box = new Box(Orientation.VERTICAL, 15) { visible=true }; + Box box = new Box(Orientation.VERTICAL, 15); box.append(create_camera_box()); this.set_child(box); @@ -21,19 +21,19 @@ public class Dino.Ui.VideoSettingsPopover : Gtk.Popover { Plugins.VideoCallPlugin call_plugin = Dino.Application.get_default().plugin_registry.video_call_plugin; Gee.List devices = call_plugin.get_devices("video", false); - Box camera_box = new Box(Orientation.VERTICAL, 10) { visible=true }; - camera_box.append(new Label("" + _("Cameras") + "") { use_markup=true, xalign=0, visible=true, can_focus=true /* grab initial focus*/ }); + Box camera_box = new Box(Orientation.VERTICAL, 10); + camera_box.append(new Label("" + _("Cameras") + "") { use_markup=true, xalign=0, can_focus=true /* grab initial focus*/ }); if (devices.size == 0) { - camera_box.append(new Label(_("No camera found.")) { visible=true }); + camera_box.append(new Label(_("No camera found."))); } else { - ListBox list_box = new ListBox() { activate_on_single_click=true, selection_mode=SelectionMode.SINGLE, visible=true }; + ListBox list_box = new ListBox() { activate_on_single_click=true, selection_mode=SelectionMode.SINGLE }; list_box.set_header_func(listbox_header_func); - Frame frame = new Frame(null) { visible=true }; + Frame frame = new Frame(null); frame.set_child(list_box); foreach (Plugins.MediaDevice device in devices) { - Label display_name_label = new Label(device.display_name) { xalign=0, visible=true }; - Image image = new Image.from_icon_name("object-select-symbolic") { visible=true }; + Label display_name_label = new Label(device.display_name) { xalign=0 }; + Image image = new Image.from_icon_name("object-select-symbolic"); if (current_device == null || current_device.id != device.id) { image.opacity = 0; } @@ -44,19 +44,19 @@ public class Dino.Ui.VideoSettingsPopover : Gtk.Popover { image.opacity = 1; } }); - Box device_box = new Box(Orientation.HORIZONTAL, 0) { spacing=7, visible=true }; + Box device_box = new Box(Orientation.HORIZONTAL, 0) { spacing=7 }; device_box.append(image); Box label_box = new Box(Orientation.VERTICAL, 0) { visible = true }; label_box.append(display_name_label); if (device.detail_name != null) { - Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; - detail_name_label.get_style_context().add_class("dim-label"); + Label detail_name_label = new Label(device.detail_name) { xalign=0 }; + detail_name_label.add_css_class("dim-label"); detail_name_label.attributes = new Pango.AttrList(); detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); label_box.append(detail_name_label); } device_box.append(label_box); - ListBoxRow list_box_row = new ListBoxRow() { visible=true }; + ListBoxRow list_box_row = new ListBoxRow(); list_box_row.set_child(device_box); list_box.append(list_box_row); -- cgit v1.2.3-54-g00ecf