fix(app): set size_limits to None for autosize

With the default size limit, autosize applets don't work as expected.
Setting this to `None` seems to work fairly well, though maybe we'll
need to tune some of these settings more later.
This commit is contained in:
Ian Douglas Scott 2023-08-22 15:20:45 -07:00 committed by GitHub
parent 78c1facd5b
commit fcdefcd8fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,6 +220,9 @@ pub fn run<App: Application>(autosize: bool, flags: App::Flags) -> iced::Result
let helper = CosmicAppletHelper::default();
let mut settings = helper.window_settings();
settings.autosize = autosize;
if autosize {
settings.size_limits = Limits::NONE;
}
if let Some(icon_theme) = settings.default_icon_theme {
crate::icon_theme::set_default(icon_theme);