Skip to content
Snippets Groups Projects
Commit 3babab74 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #172 - settings are not scrollable if stage is not large enough

parent 60416ade
No related branches found
No related tags found
1 merge request!213merge v1_6_0 into master
......@@ -29,12 +29,14 @@ import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.control.TextInputDialog;
import javafx.scene.control.ToggleGroup;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
import logger.Logger;
......@@ -49,6 +51,8 @@ import tools.Worker;
public class SettingsController implements Styleable
{
@FXML private AnchorPane anchorPaneMain;
@FXML private ScrollPane scrollPane;
@FXML private HBox hboxSettings;
@FXML private Label labelClientSecret;
@FXML private TextField textFieldClientSecret;
@FXML private TextField textFieldURL;
......@@ -128,6 +132,8 @@ public class SettingsController implements Styleable
radioButtonRestActivated.setToggleGroup(toggleGroup);
radioButtonRestDeactivated.setToggleGroup(toggleGroup);
hboxSettings.prefWidthProperty().bind(scrollPane.widthProperty().subtract(25));
refreshLabelsUpdate();
}
......@@ -577,6 +583,7 @@ public class SettingsController implements Styleable
public void applyStyle()
{
anchorPaneMain.setStyle("-fx-background-color: " + ConvertTo.toRGBHexWithoutOpacity(Colors.BACKGROUND));
scrollPane.setStyle("-fx-background-color: transparent");
labelClientSecret.setStyle("-fx-text-fill: " + ConvertTo.toRGBHexWithoutOpacity(Colors.TEXT));
labelSecret.setStyle("-fx-text-fill: " + ConvertTo.toRGBHexWithoutOpacity(Colors.TEXT));
labelURL.setStyle("-fx-text-fill: " + ConvertTo.toRGBHexWithoutOpacity(Colors.TEXT));
......
......@@ -6,6 +6,7 @@
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
......@@ -18,7 +19,9 @@
<children>
<VBox alignment="TOP_CENTER" prefHeight="562.0" prefWidth="772.0" spacing="25.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0">
<children>
<HBox prefHeight="359.0" prefWidth="722.0" VBox.vgrow="ALWAYS">
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" VBox.vgrow="ALWAYS">
<content>
<HBox fx:id="hboxSettings" prefHeight="359.0" prefWidth="722.0">
<children>
<VBox alignment="CENTER_RIGHT" prefHeight="25.0" prefWidth="158.0" spacing="15.0">
<children>
......@@ -163,7 +166,8 @@
<CheckBox fx:id="checkboxEnableAutoUpdate" mnemonicParsing="false" text="%settingstab.button.updates.automatic">
<font>
<Font size="13.0" />
</font></CheckBox>
</font>
</CheckBox>
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" spacing="10.0" HBox.hgrow="ALWAYS">
......@@ -188,11 +192,13 @@
<Label fx:id="labelCurrentVersion" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" minHeight="25.0" textAlignment="CENTER" wrapText="true">
<font>
<Font size="13.0" />
</font></Label>
</font>
</Label>
<Label fx:id="labelLatestVersion" alignment="TOP_LEFT" contentDisplay="CENTER" maxHeight="1.7976931348623157E308" minHeight="25.0" textAlignment="CENTER" wrapText="true">
<font>
<Font size="13.0" />
</font></Label>
</font>
</Label>
</children>
</VBox>
</children>
......@@ -210,10 +216,9 @@
</VBox>
</children>
</HBox>
</content>
</ScrollPane>
</children>
<padding>
<Insets right="50.0" />
</padding>
</VBox>
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment