Skip to content

Now u can't shrink the view smaller then content #138

Merged
merged 3 commits into from
May 26, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public void start(final Stage stage) throws Exception {
stage.setScene(scene);
stage.setWidth(ConfigValues.VIEWPORT_WIDTH.getValue());
stage.setHeight(ConfigValues.VIEWPORT_HEIGHT.getValue());
stage.setMinWidth(ConfigValues.MIN_VIEWPORT_WIDTH.getValue());
stage.setMinHeight(ConfigValues.MIN_VIEWPORT_HEIGHT.getValue());

ThemeManager.getInstance().registerScene(scene);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,38 @@

/**
* Enum containing configuration values for the application.
* */
*/
public enum ConfigValues {
/**
* Standard viewport width.
* */
VIEWPORT_WIDTH(600),
*/
VIEWPORT_WIDTH(800),

/**
* Standard viewport height.
* */
VIEWPORT_HEIGHT(600);
*/
VIEWPORT_HEIGHT(700),

/**
* Minimum viewport width. The window cannot be resized smaller than this.
*/
MIN_VIEWPORT_WIDTH(800),

/**
* Minimum viewport height. The window cannot be resized smaller than this.
*/
MIN_VIEWPORT_HEIGHT(700);

/**
* Integer parameter of a config value.
* */
*/
private final int value;

/**
* Constructor.
*
* @param value the value to assign this configuration.
* */
*/
ConfigValues(final int value) {
this.value = value;
}
Expand All @@ -32,7 +42,7 @@ public enum ConfigValues {
* Getter method for value.
*
* @return value of the configuration.
* */
*/
public int getValue() {
return value;
}
Expand Down