Skip to content

Using screen dimensions for window is too big #2791

Description

@kmecpp

I'm using a Windows machine and a monitor with 2560 x 1440 resolution. If I do

screen_width, screen_height = arcade.get_display_size()
Window(width=screen_width, height=screen_height)

Then Arcade creates a Window that doesn't fit on my screen because it's way too big.

Similarly, if I try to then to .maximize() then the window gets scaled down.

Why is Arcade not properly using all of the pixels in my monitor?

Full working example:

import arcade


class ScreenSizeTest(arcade.View):

    def on_resize(self, width: int, height: int) -> bool | None:
        print(f"NEW SIZE: {width} x {height}")


screen_width, screen_height = arcade.get_display_size()

print(f"Screen Size: {screen_width} x {screen_height}")
window = arcade.Window(width=screen_width, height=screen_height)
window.maximize()

view = ScreenSizeTest()
window.show_view(view)
arcade.run()

Output:

Screen Size: 2560 x 1440
NEW SIZE: 2560 x 1440
NEW SIZE: 2048 x 1128

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions