DioxusLabs / DioxusLabs/dioxus

Incorrect app size with with_min_inner_size set

Open
#4,344 0 comments 0 reactions 0 assignees View on GitHub
bug desktop windows
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

Hi guys,
I needed to set up min window size for the desktop build. I've found this solution:

```rust
let window = WindowBuilder::new()
.with_resizable(true)
.with_min_inner_size(LogicalSize::new(800.0, 600.0));

let cfg = Config::new().with_window(window);

LaunchBuilder::new().with_cfg(cfg).launch(App)
```

As a result, freshly launched app has incorrect initial size (expected 800x600), and after first window resize become correct.

https://github.com/user-attachments/assets/113e301b-edd1-42bc-bf3a-43c84d223733

If I add `.with_inner_size(LogicalSize::new(800.0, 600.0))` to the window builder, situation goes better, but still not perfect - there are still small height difference, and it become correct after I change height of the window:

https://github.com/user-attachments/assets/3992d8a7-b4e6-45a5-841e-199906940fe9

**Steps To Reproduce**

Steps to reproduce the behavior:

- Set `with_min_inner_size()` in window builder;
- Launch app;
- Check whether the app window has expected width and height.

**Expected behavior**

Application window size should be equal to value set in `with_min_inner_size()` fn.

**Environment:**

- Dioxus version: dioxus 0.6.3 (fc1f1c2)
- Rust version: rustc 1.88.0 (6b00bc388 2025-06-23)
- OS info: Windows 11
- App platform: Desktop

**Questionnaire**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.