Changed settings object widths to a more dynamic sizing
This commit is contained in:
1 parent
a73668c4be
commit
9fd5287ec7
1 file changed
+13
+13
@@ -8806,6 +8806,19 @@ fn settings_page(state: &Moorly, window: window::Id) -> Element<'_, Message> {
|
||||
|
||||
let frame = row![menu, content].width(Length::Fill).height(Length::Fill);
|
||||
|
||||
// Size the content pane like the start tab's centered panel, then add
|
||||
// the settings menu to the side.
|
||||
let panel_width = state
|
||||
.windows
|
||||
.get(&window)
|
||||
.map(|window_state| (window_state.size.width * 0.5).max(400.0) + menu_width)
|
||||
.unwrap_or(400.0 + menu_width);
|
||||
let frame = container(frame).width(panel_width).height(Length::Fill);
|
||||
let frame = container(frame)
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.align_x(Alignment::Center);
|
||||
|
||||
let dirty = state.show_start_tab_draft != state.show_start_tab
|
||||
|| state.fade_settings_draft != state.fade_settings
|
||||
|| state.hide_tab_close_draft != state.hide_tab_close
|
||||
|
||||
Reference in new issue
Block a user