Commit 93836d86 authored by Håvard Østli Fjørkenstad's avatar Håvard Østli Fjørkenstad 🐞
Browse files

Fixed issue with popOvers

parent 06580ede
......@@ -4,6 +4,9 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" value="$USER_HOME$/Desktop" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
......
......@@ -122,6 +122,8 @@ public class GUI extends Application {
/*|---------------------------------|
MAIN SCENE
|---------------------------------|*/
private HBox toolBar = new HBox();
/**
* Method used for creating a main scene
*
......@@ -169,13 +171,18 @@ public class GUI extends Application {
+ "1) Click the Upload button, and follow the necessary steps." + "\n"
+ "2) After confirming your upload, you'll be taken to the search page" + "\n"
+ "3) Here you can adjust filter settings, and view the images by clicking them" + "\n"
+ "Supported extensions: jpeg, png, gif, ico, bmp, jpg");
+ "Supported extensions: jpeg, png, gif, ico, bmp, jpg"
+ " " + "\n"
+ "Exporting: " + "\n"
+ "To export, first click the Add Mode button on the search page," + "\n"
+ "then click the add button on the individual images." + "\n"
+ "Lastly, click the export button and choose a name and location for the pdf" + "\n");
VBox helpNode = new VBox();
helpNode.setPadding(new Insets( 5,5,5,5));
helpNode.getChildren().add(helpText);
ToggleButton helpButton = createToggleButtonWithPopOver("Help", "Help", "UI/help.png", helpNode);
/*
/* Incomplete feature
ToggleSwitch toggleSwitch = new ToggleSwitch("Dark theme");
Button applyButton = new Button("Apply");
applyButton.setOnAction(e -> {
......@@ -198,7 +205,6 @@ public class GUI extends Application {
ToggleButton settingsButton = createToggleButtonWithPopOver("Settings", "Settings", "UI/settings.png", settingsNode);
//Create container for buttons
HBox toolBar = new HBox();
toolBar.setAlignment(Pos.CENTER);
toolBar.setSpacing(20);
toolBar.getChildren().addAll(helpButton, aboutButton, settingsButton);
......@@ -209,7 +215,7 @@ public class GUI extends Application {
// Create root node
GridPane root = new GridPane();
root.setAlignment(Pos.CENTER);
root.getStyleClass().add("root");
root.getStyleClass().add("mainBackground");
root.add(title, 2,1,1,1);
root.add(upload, 1,2,1,1);
root.add(search, 3,2,1,1);
......@@ -1270,6 +1276,8 @@ public class GUI extends Application {
popOver.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER);
contentNode.getStyleClass().add("contentNode");
popOver.setContentNode(contentNode);
popOver.setAutoHide(false);
ToggleButton button = new ToggleButton();
button.setTooltip(new Tooltip(buttonName));
button.setPadding(new Insets(5,5,5,5));
......@@ -1280,6 +1288,7 @@ public class GUI extends Application {
popOver.hide();
} else {
popOver.show(button);
popOver.setDetached(true);
}
});
return button;
......
.root {
.mainBackground {
-fx-background-color: linear-gradient(to bottom left, #2320df, #207ddf, #20dcdf);
}
......
/* Not usable */
.root {
-fx-background-color: linear-gradient(to bottom left, #2320df, #207ddf, #20dcdf);
}
......
No preview for this file type
.root {
.mainBackground {
-fx-background-color: linear-gradient(to bottom left, #2320df, #207ddf, #20dcdf);
}
......
/* Not usable */
.root {
-fx-background-color: linear-gradient(to bottom left, #2320df, #207ddf, #20dcdf);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment