diff --git a/src/ui/mod.rs b/src/ui/mod.rs index ae84ddb..3cf52a0 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -22,3 +22,4 @@ mod wivrn_conf_editor; pub mod wivrn_encoder_presets_win; pub const SENDER_IO_ERR_MSG: &str = "relm4 sender i/o failed"; +pub const ADW_DIALOG_WIDTH: i32 = 600; diff --git a/src/ui/profile_editor.rs b/src/ui/profile_editor.rs index 6e11198..d9fee3b 100644 --- a/src/ui/profile_editor.rs +++ b/src/ui/profile_editor.rs @@ -8,6 +8,7 @@ use crate::{ ui::{ factories::env_var_row_factory::EnvVarModelOutMsg, preference_rows::{combo_row, entry_row, path_row, switch_row}, + ADW_DIALOG_WIDTH, }, }; use adw::prelude::*; @@ -61,7 +62,7 @@ impl SimpleComponent for ProfileEditor { adw::Dialog { #[track = "model.changed(Self::profile())"] set_title: model.profile.borrow().name.as_str(), - set_follows_content_size: true, + set_content_width: ADW_DIALOG_WIDTH, #[wrap(Some)] set_child: tbview = &adw::ToolbarView { set_top_bar_style: adw::ToolbarStyle::Flat, diff --git a/src/ui/wivrn_conf_editor.rs b/src/ui/wivrn_conf_editor.rs index 9b5aaf4..6704221 100644 --- a/src/ui/wivrn_conf_editor.rs +++ b/src/ui/wivrn_conf_editor.rs @@ -15,6 +15,7 @@ use crate::{ preference_rows::{number_entry_row, spin_row, switch_row}, util::bits_to_mbits, wivrn_encoder_presets_win::WivrnEncoderPresetsWinInit, + ADW_DIALOG_WIDTH, }, }; use adw::prelude::*; @@ -65,6 +66,7 @@ impl SimpleComponent for WivrnConfEditor { #[name(win)] adw::Dialog { set_title: "WiVRn Configuration", + set_content_width: ADW_DIALOG_WIDTH, #[wrap(Some)] set_child: tbview = &adw::ToolbarView { set_top_bar_style: adw::ToolbarStyle::Flat,