fix: use fixed window width for all applets
This commit is contained in:
parent
9b09c97665
commit
61d1d1b91d
11 changed files with 12 additions and 91 deletions
|
|
@ -150,11 +150,6 @@ impl cosmic::Application for CosmicA11yApplet {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.max_width(300.0)
|
|
||||||
.min_width(200.0)
|
|
||||||
.min_height(10.0)
|
|
||||||
.max_height(1080.0);
|
|
||||||
|
|
||||||
return get_popup(popup_settings);
|
return get_popup(popup_settings);
|
||||||
}
|
}
|
||||||
|
|
@ -267,12 +262,7 @@ impl cosmic::Application for CosmicA11yApplet {
|
||||||
menu_button(text::body(fl!("settings"))).on_press(Message::OpenSettings)
|
menu_button(text::body(fl!("settings"))).on_press(Message::OpenSettings)
|
||||||
]
|
]
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
self.core
|
self.core.applet.popup_container(content_list).into()
|
||||||
.applet
|
|
||||||
.popup_container(content_list)
|
|
||||||
.max_width(372.)
|
|
||||||
.max_height(600.)
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn subscription(&self) -> Subscription<Message> {
|
fn subscription(&self) -> Subscription<Message> {
|
||||||
|
|
|
||||||
|
|
@ -363,11 +363,6 @@ impl cosmic::Application for Audio {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.min_height(1.0)
|
|
||||||
.min_width(1.0)
|
|
||||||
.max_width(400.0)
|
|
||||||
.max_height(1080.0);
|
|
||||||
|
|
||||||
if let Some(conn) = self.pulse_state.connection() {
|
if let Some(conn) = self.pulse_state.connection() {
|
||||||
conn.send(pulse::Message::GetDefaultSink);
|
conn.send(pulse::Message::GetDefaultSink);
|
||||||
|
|
@ -970,11 +965,7 @@ impl cosmic::Application for Audio {
|
||||||
.align_x(Alignment::Start)
|
.align_x(Alignment::Start)
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
||||||
self.core
|
self.core.applet.popup_container(container(content)).into()
|
||||||
.applet
|
|
||||||
.popup_container(container(content))
|
|
||||||
.limits(Limits::NONE.max_width(400.))
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_close_requested(&self, id: window::Id) -> Option<Message> {
|
fn on_close_requested(&self, id: window::Id) -> Option<Message> {
|
||||||
|
|
|
||||||
|
|
@ -354,11 +354,6 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.max_width(372.0)
|
|
||||||
.min_width(300.0)
|
|
||||||
.min_height(200.0)
|
|
||||||
.max_height(1080.0);
|
|
||||||
if let Some(tx) = self.power_profile_sender.as_ref() {
|
if let Some(tx) = self.power_profile_sender.as_ref() {
|
||||||
let _ = tx.send(PowerProfileRequest::Get);
|
let _ = tx.send(PowerProfileRequest::Get);
|
||||||
}
|
}
|
||||||
|
|
@ -826,8 +821,6 @@ impl cosmic::Application for CosmicBatteryApplet {
|
||||||
self.core
|
self.core
|
||||||
.applet
|
.applet
|
||||||
.popup_container(Column::with_children(content).padding([8, 0]))
|
.popup_container(Column::with_children(content).padding([8, 0]))
|
||||||
.max_width(372.)
|
|
||||||
.max_height(600.)
|
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,16 +140,11 @@ impl cosmic::Application for CosmicBluetoothApplet {
|
||||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||||
self.core.main_window_id().unwrap(),
|
self.core.main_window_id().unwrap(),
|
||||||
new_id,
|
new_id,
|
||||||
Some((1, 1)),
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.min_height(1.0)
|
|
||||||
.min_width(1.0)
|
|
||||||
.max_height(800.0)
|
|
||||||
.max_width(400.0);
|
|
||||||
let tx = self.bluer_sender.as_ref().cloned();
|
let tx = self.bluer_sender.as_ref().cloned();
|
||||||
return Task::batch(vec![
|
return Task::batch(vec![
|
||||||
iced::Task::perform(
|
iced::Task::perform(
|
||||||
|
|
|
||||||
|
|
@ -157,11 +157,7 @@ impl cosmic::Application for Window {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.max_width(372.0)
|
|
||||||
.min_width(300.0)
|
|
||||||
.min_height(1.)
|
|
||||||
.max_height(1080.0);
|
|
||||||
get_popup(popup_settings)
|
get_popup(popup_settings)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -274,17 +270,7 @@ impl cosmic::Application for Window {
|
||||||
.on_press(Message::KeyboardSettings),
|
.on_press(Message::KeyboardSettings),
|
||||||
);
|
);
|
||||||
|
|
||||||
self.core
|
self.core.applet.popup_container(content_list).into()
|
||||||
.applet
|
|
||||||
.popup_container(content_list)
|
|
||||||
.limits(
|
|
||||||
Limits::NONE
|
|
||||||
.min_height(1.)
|
|
||||||
.max_height(1080.)
|
|
||||||
.min_width(1.)
|
|
||||||
.max_width(372.),
|
|
||||||
)
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn subscription(&self) -> Subscription<Self::Message> {
|
fn subscription(&self) -> Subscription<Self::Message> {
|
||||||
|
|
|
||||||
|
|
@ -219,8 +219,6 @@ impl CosmicNetworkApplet {
|
||||||
self.core
|
self.core
|
||||||
.applet
|
.applet
|
||||||
.popup_container(content.padding([8, 0, 8, 0]))
|
.popup_container(content.padding([8, 0, 8, 0]))
|
||||||
.max_width(400.)
|
|
||||||
.max_height(800.)
|
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -310,11 +308,6 @@ impl cosmic::Application for CosmicNetworkApplet {
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
|
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.min_height(1.0)
|
|
||||||
.min_width(1.0)
|
|
||||||
.max_height(800.0)
|
|
||||||
.max_width(400.0);
|
|
||||||
if let Some(tx) = self.nm_sender.as_mut() {
|
if let Some(tx) = self.nm_sender.as_mut() {
|
||||||
let _ = tx.unbounded_send(NetworkManagerRequest::Reload);
|
let _ = tx.unbounded_send(NetworkManagerRequest::Reload);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -216,11 +216,7 @@ impl cosmic::Application for Notifications {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.min_width(1.0)
|
|
||||||
.max_width(444.0)
|
|
||||||
.min_height(100.0)
|
|
||||||
.max_height(900.0);
|
|
||||||
return get_popup(popup_settings);
|
return get_popup(popup_settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -623,11 +619,7 @@ impl cosmic::Application for Notifications {
|
||||||
.align_x(Alignment::Start)
|
.align_x(Alignment::Start)
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
||||||
self.core
|
self.core.applet.popup_container(content).into()
|
||||||
.applet
|
|
||||||
.popup_container(content)
|
|
||||||
.limits(Limits::NONE.max_width(444.).max_height(900.))
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn on_close_requested(&self, id: window::Id) -> Option<Message> {
|
fn on_close_requested(&self, id: window::Id) -> Option<Message> {
|
||||||
|
|
|
||||||
|
|
@ -144,15 +144,11 @@ impl cosmic::Application for Power {
|
||||||
let mut popup_settings = self.core.applet.get_popup_settings(
|
let mut popup_settings = self.core.applet.get_popup_settings(
|
||||||
self.core.main_window_id().unwrap(),
|
self.core.main_window_id().unwrap(),
|
||||||
new_id,
|
new_id,
|
||||||
Some((500, 500)),
|
None,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.min_width(100.0)
|
|
||||||
.min_height(100.0)
|
|
||||||
.max_height(400.0)
|
|
||||||
.max_width(500.0);
|
|
||||||
get_popup(popup_settings)
|
get_popup(popup_settings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -269,12 +265,7 @@ impl cosmic::Application for Power {
|
||||||
.align_x(Alignment::Start)
|
.align_x(Alignment::Start)
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
||||||
self.core
|
self.core.applet.popup_container(content).into()
|
||||||
.applet
|
|
||||||
.popup_container(content)
|
|
||||||
.max_height(400.)
|
|
||||||
.max_width(500.)
|
|
||||||
.into()
|
|
||||||
} else {
|
} else {
|
||||||
//panic!("no view for window {}", id.0)
|
//panic!("no view for window {}", id.0)
|
||||||
widget::text("").into()
|
widget::text("").into()
|
||||||
|
|
|
||||||
|
|
@ -303,7 +303,6 @@ impl cosmic::Application for App {
|
||||||
container(menu.popup_view().map(move |msg| Msg::StatusMenu((id, msg))))
|
container(menu.popup_view().map(move |msg| Msg::StatusMenu((id, msg))))
|
||||||
.padding([pad, 0.]),
|
.padding([pad, 0.]),
|
||||||
)
|
)
|
||||||
.limits(Limits::NONE.min_width(1.).min_height(1.).max_width(300.))
|
|
||||||
.into(),
|
.into(),
|
||||||
None => unreachable!(),
|
None => unreachable!(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -195,11 +195,7 @@ impl cosmic::Application for Window {
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
popup_settings.positioner.size_limits = Limits::NONE
|
|
||||||
.max_width(400.0)
|
|
||||||
.min_width(300.0)
|
|
||||||
.min_height(200.0)
|
|
||||||
.max_height(1080.0);
|
|
||||||
get_popup(popup_settings)
|
get_popup(popup_settings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -368,11 +364,7 @@ impl cosmic::Application for Window {
|
||||||
]
|
]
|
||||||
.padding([8, 0]);
|
.padding([8, 0]);
|
||||||
|
|
||||||
self.core
|
self.core.applet.popup_container(content_list).into()
|
||||||
.applet
|
|
||||||
.popup_container(content_list)
|
|
||||||
.max_width(400.)
|
|
||||||
.into()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn style(&self) -> Option<cosmic::iced_runtime::Appearance> {
|
fn style(&self) -> Option<cosmic::iced_runtime::Appearance> {
|
||||||
|
|
|
||||||
|
|
@ -677,7 +677,6 @@ impl cosmic::Application for Window {
|
||||||
self.core
|
self.core
|
||||||
.applet
|
.applet
|
||||||
.popup_container(container(content_list))
|
.popup_container(container(content_list))
|
||||||
.max_width(300.)
|
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue