Skip to content

Window size use logical size by default + inconsistent unit + WindowDescriptor.resizable not working #2888

Open
@iacore

Description

Bevy version

db55bf5

Operating system & version

Linux 5.13.19-2-MANJARO

What you did

First, I tried to set window size to 900 x 600;

use bevy::prelude::*;

fn main() {    
    let window = WindowDescriptor {
        width: 900.0,
        height: 600.0,
        ..Default::default()
    };

    App::build()
        .insert_resource(window)
        .add_plugins(DefaultPlugins)
        .insert_resource(ClearColor(Color::rgb(0.9, 0.9, 0.9)))
        .add_system(bevy::input::system::exit_on_esc_system.system())
        .run();
}

However, the window was near 1080px tall, not 600.

So I set scale_factor_override: Some(1.0), and the window size was correct.

Then, I tried to make window fixed size with resizable: false. That didn't work either.

So I set window.resize_constraints to 900 x 600. However, the actual window was now 1.75 times bigger than expected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions