Joined: May 28, 2015
Post Count: 607
Status:
Offline
Resizable photo panel?
In this thread , it is discussed the possibility of changing the size of the photo panel.
The simple solution to make it resizable involves other consequences: - deformation without respect of the ratio - maximum size limit not taken into account - truncated text when changing language
The solution to include this size change in user preferences does not seem possible from a plug-in.
Is it possible to change the size of the photo panel as needed?
----------------------------------------
EnkoNyito
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Resizable photo panel?
You can accept that the dialog box showing the photo panel is resizable by calling
dialog.setResizable(true);
in displayView method. But of course, you main have to pay more attention to the layout of the panel...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: Resizable photo panel?
You can accept that the dialog box showing the photo panel is resizable by calling
dialog.setResizable(true);
in displayView method.
That's what I meant by simple solution (manual resizing).
But of course, you main have to pay more attention to the layout of the panel...
I noticed that there is a minimum size depending on LookAndFeel and language chosen.
On the other hand, is it normal that the maximum size is not taken into account when resizing?
Can you confirm that it is not possible to add a new user preference from a plug-in?
From your experience, what do you think of the option suggested by ndorigatti which is to add a button to change the size of the panel?
----------------------------------------
EnkoNyito
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Resizable photo panel?
setMinimumSize was added to Window class in Java 6, but there's still no setMaximumSize method
There's no API in UserPreferences class to manage additional preferences, and nothing in the user interface for that. At the moment, this can be done only by subclassing this class in a derived version of Sweet Home 3D.
Managing the size of the panel isn't difficult, just call dialog.setResizable(true). I checked in PhotoPanel class and the photo component at the top will be enlarged accordingly. But the space at the left and right of the components at the bottom may look uselessly large if you don't manage their layout differently. It's probably the reason why I didn't make the dialog resizable. An other option could be to add some zoom -/+ buttons to view details in the photo component, like in the background image import wizard.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator