Skip to content

Scene width and height not set correctly at startup #187

@ionse

Description

@ionse

Please ignore this issue: Upoon further review it seems that the behavior is the result of specific JDK/JavaFX/Window Manager combinations. This was confirmed by running modified versions of Jenkov's java StageExample on different JDK/JavaFX/Window Manager combinations. The resulting behavior was inconsistent. Furthermore, the openjfx documentation states "... Further, setting this property might be ignored on some platforms." in reference to the height and width property.


I wrote a program that set the initial width and height of the scene some time ago but this stopped working.

Code that illustrates the problem is attached (I use leiningen):

  • project.clj
  • core.clj

When running the application a window appears but the width and height are initially incorrectly set to min-width and min-height (which is half of width and height in this case) as opposed to the requested width and height.

As an aside, cljfx is awsome and I'm really appreciative that it is available.

Thanks for any help that can be provided with regard to this issue.

Added note: I experimented some more with the options in the ":fx/type :stage" section and discovered that if I set ":style :UNDECORATED" things work as expected. If on the other hand I set ":style :DECORATED" then I get the weird behavior of height and width not being set...

project.clj.txt

core.clj.txt

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