I have a scene on a stage. The width of the scene is 337.0 pixels. However, when I add it to the stage, the size of the stage is 337.6 pixels which leaves a white gap at the right edge of the screen due to the 0.6 pixel difference.
I tried using stage.sizeToScene(), but that's not working. I also tried setting the width of the stage manually by trying stage.setWidth(337). that did not affect the width of the stage, it still remained 337.6.
The I tried the following: stage.setWidth(337.0). Then when I print the stage width on the console, by using stage.getWidth(), the value printed is 337.0, however in actual, the 0.6 pixel white line still stays.
I tried doing the following alos:
stage.hide();
stage.show();
This worked, it removed the white line, but it shows the window switching which looks very bad. Is there a way to do the same without switching windows like above.
Any help will be appreciated.