WindowConfig::with_size() doesn't change the initial window size #2019
Answered
by
marc2332
Vicky-Developer28
asked this question in
Q&A
-
|
Hi @marc2332, I'm currently learning Rust and started building a simple calculator with Freya. I'm trying to set the initial window size using Exampleuse freya::prelude::*;
fn main() {
let (width, height) = (600, 600);
launch(
LaunchConfig::new()
.with_window(
WindowConfig::new(app)
.with_size(width as f64, height as f64),
),
);
}
fn app() -> impl IntoElement {
rect()
.width(Size::fill())
.height(Size::fill())
.padding(Gaps::new_all(12.))
.background(Color::LIGHT_GRAY)
.child(
rect()
.width(Size::fill_minimum())
.height(Size::fill_minimum())
.background(Color::RED),
)
}Output
I'm not sure whether:
Could you please let me know if I'm doing something wrong? For reference:
Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
marc2332
Jul 18, 2026
Replies: 1 comment
-
|
I would argue its an issue in your hyperland configuration.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Vicky-Developer28
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


I would argue its an issue in your hyperland configuration.