Settings-UI clean up

* cleand up the settings ui #15
* the menu button si now a hamburger menu
This commit is contained in:
Seil0 2017-06-07 01:42:18 +02:00
parent ae525f6c49
commit 59bfe126c5
18 changed files with 150 additions and 81 deletions

Binary file not shown.

View File

@ -2,9 +2,11 @@
<?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?> <?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXHamburger?>
<?import com.jfoenix.controls.JFXSlider?> <?import com.jfoenix.controls.JFXSlider?>
<?import com.jfoenix.controls.JFXTextField?> <?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXToggleButton?> <?import com.jfoenix.controls.JFXToggleButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ChoiceBox?> <?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
@ -46,10 +48,14 @@
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" /> <JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
<HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
<JFXButton fx:id="menubtn" onAction="#menubtnclicked" prefHeight="32.0" prefWidth="32.0" /> <JFXHamburger fx:id="menuHam">
<padding>
<Insets left="3.0" />
</padding>
</JFXHamburger>
</children> </children>
</HBox> </HBox>
<VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0"> <VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="32.0">
<children> <children>
<JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER"> <JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font> <font>
@ -86,16 +92,23 @@
</children></AnchorPane> </children></AnchorPane>
<AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> <AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children> <children>
<JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="14.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" /> <JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="81.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
<JFXButton fx:id="directoryBtn" layoutX="255.0" layoutY="8.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="260.0" /> <JFXButton fx:id="directoryBtn" layoutX="276.0" layoutY="82.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="269.0" AnchorPane.topAnchor="82.0" />
<JFXColorPicker fx:id="mainColor" layoutX="14.0" layoutY="45.0" onAction="#mainColorAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" /> <JFXColorPicker fx:id="mainColor" layoutX="118.0" layoutY="130.0" onAction="#mainColorAction" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="sizelbl" layoutY="73.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="75.0" /> <Label fx:id="fontsizeLabel" layoutX="14.0" layoutY="179.0" text="Fontsize" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="175.0" />
<JFXSlider fx:id="sliderFontSize" layoutX="10.0" layoutY="99.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="110.0" /> <JFXSlider fx:id="sliderFontSize" layoutX="118.0" layoutY="177.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="177.0" />
<ChoiceBox fx:id="cbLocal" layoutX="14.0" layoutY="131.0" prefWidth="150.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="145.0" /> <ChoiceBox fx:id="cbLocal" layoutX="118.0" layoutY="208.0" prefWidth="150.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="208.0" />
<JFXButton fx:id="updateBtn" layoutX="7.0" layoutY="177.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="180.0" /> <JFXButton fx:id="updateBtn" layoutX="16.0" layoutY="269.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="253.0" />
<Label fx:id="aulbl" layoutX="43.0" layoutY="219.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="215.0" /> <Label fx:id="autoUpdateLabel" layoutX="14.0" layoutY="310.0" prefHeight="17.0" text="check at startup for updates:" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="298.0" />
<JFXToggleButton fx:id="autoupdateBtn" layoutX="19.0" layoutY="215.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="230.0" /> <JFXToggleButton fx:id="autoupdateBtn" layoutX="14.0" layoutY="336.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="320.0" />
<Label fx:id="versionlbl" layoutX="29.0" layoutY="297.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="280.0" /> <Label fx:id="versionLabel" layoutX="14.0" layoutY="418.0" text="Label" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="396.0" />
<Label fx:id="settingsHead1Label" layoutX="14.0" layoutY="24.0" text="HomeFlix Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="24.0">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label fx:id="mainColorLabel" layoutX="14.0" layoutY="134.0" prefHeight="25.0" text="Main-Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="localLabel" layoutX="14.0" layoutY="207.0" text="Local" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="212.0" />
</children> </children>
</AnchorPane> </AnchorPane>
</children> </children>

View File

@ -1 +0,0 @@
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */

View File

@ -128,7 +128,7 @@ public class Main extends Application {
mainWindowController.addDataUI(); mainWindowController.addDataUI();
Scene scene = new Scene(pane); //create new scene, append pane to scene Scene scene = new Scene(pane); //create new scene, append pane to scene
scene.getStylesheets().add(Main.class.getResource("MainWindow.css").toExternalForm());
primaryStage.setScene(scene); //append scene to stage primaryStage.setScene(scene); //append scene to stage
primaryStage.show(); //show stage primaryStage.show(); //show stage
} catch (IOException e) { } catch (IOException e) {

View File

@ -0,0 +1,4 @@
.jfx-hamburgerW StackPane { -fx-background-color: white;
-fx-background-radius: 5px; }
.jfx-hamburgerB StackPane { -fx-background-color: black;
-fx-background-radius: 5px; }

View File

@ -2,9 +2,11 @@
<?import com.jfoenix.controls.JFXButton?> <?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXColorPicker?> <?import com.jfoenix.controls.JFXColorPicker?>
<?import com.jfoenix.controls.JFXHamburger?>
<?import com.jfoenix.controls.JFXSlider?> <?import com.jfoenix.controls.JFXSlider?>
<?import com.jfoenix.controls.JFXTextField?> <?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXToggleButton?> <?import com.jfoenix.controls.JFXToggleButton?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ChoiceBox?> <?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
@ -46,10 +48,14 @@
<JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" /> <JFXButton fx:id="forwardBtn" contentDisplay="CENTER" layoutX="798.0" layoutY="443.0" onAction="#forwardBtnclicked" prefHeight="25.0" prefWidth="90.0" AnchorPane.bottomAnchor="132.0" AnchorPane.rightAnchor="12.0" />
<HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <HBox fx:id="topHBox" layoutY="12.0" prefHeight="32.0" prefWidth="900.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
<JFXButton fx:id="menubtn" onAction="#menubtnclicked" prefHeight="32.0" prefWidth="32.0" /> <JFXHamburger fx:id="menuHam">
<padding>
<Insets left="3.0" />
</padding>
</JFXHamburger>
</children> </children>
</HBox> </HBox>
<VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="38.0"> <VBox fx:id="sideMenuVBox" layoutY="32.0" prefHeight="660.0" prefWidth="150.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="32.0">
<children> <children>
<JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER"> <JFXButton fx:id="infoBtn" onAction="#infoBtnclicked" prefHeight="32.0" prefWidth="150.0" textAlignment="CENTER">
<font> <font>
@ -86,16 +92,23 @@
</children></AnchorPane> </children></AnchorPane>
<AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0"> <AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
<children> <children>
<JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="14.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" /> <JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="81.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
<JFXButton fx:id="directoryBtn" layoutX="255.0" layoutY="8.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="260.0" /> <JFXButton fx:id="directoryBtn" layoutX="276.0" layoutY="82.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="269.0" AnchorPane.topAnchor="82.0" />
<JFXColorPicker fx:id="mainColor" layoutX="14.0" layoutY="45.0" onAction="#mainColorAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" /> <JFXColorPicker fx:id="mainColor" layoutX="118.0" layoutY="130.0" onAction="#mainColorAction" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="sizelbl" layoutY="73.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="75.0" /> <Label fx:id="fontsizeLabel" layoutX="14.0" layoutY="179.0" text="Fontsize" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="175.0" />
<JFXSlider fx:id="sliderFontSize" layoutX="10.0" layoutY="99.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="110.0" /> <JFXSlider fx:id="sliderFontSize" layoutX="118.0" layoutY="177.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="177.0" />
<ChoiceBox fx:id="cbLocal" layoutX="14.0" layoutY="131.0" prefWidth="150.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="145.0" /> <ChoiceBox fx:id="cbLocal" layoutX="118.0" layoutY="208.0" prefWidth="150.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="208.0" />
<JFXButton fx:id="updateBtn" layoutX="7.0" layoutY="177.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="180.0" /> <JFXButton fx:id="updateBtn" layoutX="16.0" layoutY="269.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="253.0" />
<Label fx:id="aulbl" layoutX="43.0" layoutY="219.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="215.0" /> <Label fx:id="autoUpdateLabel" layoutX="14.0" layoutY="310.0" prefHeight="17.0" text="check at startup for updates:" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="298.0" />
<JFXToggleButton fx:id="autoupdateBtn" layoutX="19.0" layoutY="215.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="230.0" /> <JFXToggleButton fx:id="autoupdateBtn" layoutX="14.0" layoutY="336.0" onAction="#autoupdateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="320.0" />
<Label fx:id="versionlbl" layoutX="29.0" layoutY="297.0" text="Label" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="280.0" /> <Label fx:id="versionLabel" layoutX="14.0" layoutY="418.0" text="Label" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="396.0" />
<Label fx:id="settingsHead1Label" layoutX="14.0" layoutY="24.0" text="HomeFlix Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="24.0">
<font>
<Font name="System Bold" size="14.0" />
</font>
</Label>
<Label fx:id="mainColorLabel" layoutX="14.0" layoutY="134.0" prefHeight="25.0" text="Main-Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="130.0" />
<Label fx:id="localLabel" layoutX="14.0" layoutY="207.0" text="Local" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="212.0" />
</children> </children>
</AnchorPane> </AnchorPane>
</children> </children>

View File

@ -42,9 +42,11 @@ import java.util.Properties;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXColorPicker; import com.jfoenix.controls.JFXColorPicker;
import com.jfoenix.controls.JFXHamburger;
import com.jfoenix.controls.JFXSlider; import com.jfoenix.controls.JFXSlider;
import com.jfoenix.controls.JFXTextField; import com.jfoenix.controls.JFXTextField;
import com.jfoenix.controls.JFXToggleButton; import com.jfoenix.controls.JFXToggleButton;
import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition;
import javafx.animation.FadeTransition; import javafx.animation.FadeTransition;
import javafx.animation.ParallelTransition; import javafx.animation.ParallelTransition;
@ -72,6 +74,7 @@ import javafx.scene.control.TreeTableColumn.SortType;
import javafx.scene.control.TreeTableView; import javafx.scene.control.TreeTableView;
import javafx.scene.image.Image; import javafx.scene.image.Image;
import javafx.scene.image.ImageView; import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane; import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox; import javafx.scene.layout.HBox;
@ -103,8 +106,6 @@ public class MainWindowController {
@FXML @FXML
ScrollPane scrollPane; ScrollPane scrollPane;
@FXML @FXML
private JFXButton menubtn; //TODO switch to hamburger menu
@FXML
private JFXButton playbtn; private JFXButton playbtn;
@FXML @FXML
private JFXButton openfolderbtn; private JFXButton openfolderbtn;
@ -129,6 +130,8 @@ public class MainWindowController {
@FXML @FXML
private JFXButton streamingDirectoryBtn; private JFXButton streamingDirectoryBtn;
@FXML @FXML
private JFXHamburger menuHam;
@FXML
private JFXToggleButton autoupdateBtn; private JFXToggleButton autoupdateBtn;
@FXML @FXML
public JFXTextField tfPath; public JFXTextField tfPath;
@ -143,13 +146,20 @@ public class MainWindowController {
@FXML @FXML
public JFXSlider sliderFontSize; public JFXSlider sliderFontSize;
@FXML @FXML
private Label versionlbl; private Label versionLabel;
@FXML @FXML
private Label sizelbl; private Label fontsizeLabel;
@FXML @FXML
private Label aulbl; private Label autoUpdateLabel;
@FXML
private Label settingsHead1Label;
@FXML
private Label mainColorLabel;
@FXML
private Label localLabel;
@FXML @FXML
ImageView image1; ImageView image1;
private ImageView imv1; private ImageView imv1;
@FXML @FXML
@ -176,14 +186,14 @@ public class MainWindowController {
@FXML @FXML
private TableColumn<tableData, String> dataNameEndColumn = new TableColumn<>("Datei Name mit Endung"); private TableColumn<tableData, String> dataNameEndColumn = new TableColumn<>("Datei Name mit Endung");
private boolean menutrue = false; //saves the position of menuBtn (opened or closed) private boolean menuTrue = false; //saves the position of menuBtn (opened or closed)
private boolean settingstrue = false; private boolean settingsTrue = false;
private boolean streamingSettingsTrue = false; private boolean streamingSettingsTrue = false;
private boolean autoUpdate = false; private boolean autoUpdate = false;
static boolean firststart = false; static boolean firststart = false;
private int hashA = -2055934614; private int hashA = -2055934614;
private String version = "0.5.1"; private String version = "0.5.1";
private String buildNumber = "127"; private String buildNumber = "129";
private String versionName = "plasma cow"; private String versionName = "plasma cow";
private File dirWin = new File(System.getProperty("user.home") + "/Documents/HomeFlix"); private File dirWin = new File(System.getProperty("user.home") + "/Documents/HomeFlix");
private File dirLinux = new File(System.getProperty("user.home") + "/HomeFlix"); private File dirLinux = new File(System.getProperty("user.home") + "/HomeFlix");
@ -239,8 +249,6 @@ public class MainWindowController {
ObservableList<tableData> localFilms = FXCollections.observableArrayList(); ObservableList<tableData> localFilms = FXCollections.observableArrayList();
ObservableList<tableData> streamingFilms = FXCollections.observableArrayList(); ObservableList<tableData> streamingFilms = FXCollections.observableArrayList();
ObservableList<tableData> streamingData = FXCollections.observableArrayList(); ObservableList<tableData> streamingData = FXCollections.observableArrayList();
private ImageView menu_icon_black = new ImageView(new Image("resources/icons/menu_icon_black.png"));
private ImageView menu_icon_white = new ImageView(new Image("resources/icons/menu_icon_white.png"));
private ImageView skip_previous_white = new ImageView(new Image("resources/icons/ic_skip_previous_white_18dp_1x.png")); private ImageView skip_previous_white = new ImageView(new Image("resources/icons/ic_skip_previous_white_18dp_1x.png"));
private ImageView skip_previous_black = new ImageView(new Image("resources/icons/ic_skip_previous_black_18dp_1x.png")); private ImageView skip_previous_black = new ImageView(new Image("resources/icons/ic_skip_previous_black_18dp_1x.png"));
private ImageView skip_next_white = new ImageView(new Image("resources/icons/ic_skip_next_white_18dp_1x.png")); private ImageView skip_next_white = new ImageView(new Image("resources/icons/ic_skip_next_white_18dp_1x.png"));
@ -258,30 +266,6 @@ public class MainWindowController {
private apiQuery ApiQuery; private apiQuery ApiQuery;
DBController dbController; DBController dbController;
/**
* TODO change value of Text-color change
*/
@FXML
private void menubtnclicked(){
if(menutrue == false){
sideMenuSlideIn();
menutrue = true;
}else{
sideMenuSlideOut();
menutrue = false;
}
if(settingstrue == true){
settingsAnchor.setVisible(false);
setPath(tfPath.getText());
saveSettings();
settingstrue = false;
}
if(streamingSettingsTrue == true){
streamingSettingsAnchor.setVisible(false);
streamingSettingsTrue = false;
}
}
@FXML @FXML
private void playbtnclicked(){ private void playbtnclicked(){
System.out.println(System.getProperty("os.name")); System.out.println(System.getProperty("os.name"));
@ -367,18 +351,18 @@ public class MainWindowController {
@FXML @FXML
private void settingsBtnclicked(){ private void settingsBtnclicked(){
if(settingstrue == false){ if(settingsTrue == false){
if(streamingSettingsTrue == true){ if(streamingSettingsTrue == true){
streamingSettingsAnchor.setVisible(false); streamingSettingsAnchor.setVisible(false);
streamingSettingsTrue = false; streamingSettingsTrue = false;
} }
settingsAnchor.setVisible(true); settingsAnchor.setVisible(true);
settingstrue = true; settingsTrue = true;
}else{ }else{
settingsAnchor.setVisible(false); settingsAnchor.setVisible(false);
setPath(tfPath.getText()); setPath(tfPath.getText());
saveSettings(); saveSettings();
settingstrue = false; settingsTrue = false;
} }
} }
@ -388,9 +372,9 @@ public class MainWindowController {
@FXML @FXML
private void streamingSettingsBtnclicked(){ private void streamingSettingsBtnclicked(){
if(streamingSettingsTrue == false){ if(streamingSettingsTrue == false){
if(settingstrue == true){ if(settingsTrue == true){
settingsAnchor.setVisible(false); settingsAnchor.setVisible(false);
settingstrue = false; settingsTrue = false;
} }
streamingSettingsAnchor.setVisible(true); streamingSettingsAnchor.setVisible(true);
streamingSettingsTrue = true; streamingSettingsTrue = true;
@ -415,8 +399,8 @@ public class MainWindowController {
settingsAnchor.setVisible(false); settingsAnchor.setVisible(false);
streamingSettingsAnchor.setVisible(false); streamingSettingsAnchor.setVisible(false);
sideMenuSlideOut(); //disables side-menu sideMenuSlideOut(); //disables side-menu
menutrue = false; menuTrue = false;
settingstrue = false; settingsTrue = false;
streamingSettingsTrue = false; streamingSettingsTrue = false;
} }
@ -581,6 +565,32 @@ public class MainWindowController {
//Initializing the actions //Initializing the actions
void initActions(){ void initActions(){
HamburgerBackArrowBasicTransition burgerTask = new HamburgerBackArrowBasicTransition(menuHam);
menuHam.addEventHandler(MouseEvent.MOUSE_PRESSED, (e)->{
if(menuTrue == false){
sideMenuSlideIn();
burgerTask.setRate(1.0);
burgerTask.play();
menuTrue = true;
}else{
sideMenuSlideOut();
burgerTask.setRate(-1.0);
burgerTask.play();
menuTrue = false;
}
if(settingsTrue == true){
settingsAnchor.setVisible(false);
setPath(tfPath.getText());
saveSettings();
settingsTrue = false;
}
if(streamingSettingsTrue == true){
streamingSettingsAnchor.setVisible(false);
streamingSettingsTrue = false;
}
});
tfsearch.textProperty().addListener(new ChangeListener<String>() { tfsearch.textProperty().addListener(new ChangeListener<String>() {
@Override @Override
public void changed(ObservableValue<? extends String> observable,String oldValue, String newValue) { public void changed(ObservableValue<? extends String> observable,String oldValue, String newValue) {
@ -850,7 +860,7 @@ public class MainWindowController {
playbtn.setGraphic(play_arrow_white); playbtn.setGraphic(play_arrow_white);
returnBtn.setGraphic(skip_previous_white); returnBtn.setGraphic(skip_previous_white);
forwardBtn.setGraphic(skip_next_white); forwardBtn.setGraphic(skip_next_white);
menubtn.setGraphic(menu_icon_white); menuHam.getStyleClass().add("jfx-hamburgerW");
}else{ }else{
settingsBtn.setStyle("-fx-text-fill: BLACK;"); settingsBtn.setStyle("-fx-text-fill: BLACK;");
streamingSettingsBtn.setStyle("-fx-text-fill: BLACK;"); streamingSettingsBtn.setStyle("-fx-text-fill: BLACK;");
@ -867,7 +877,7 @@ public class MainWindowController {
playbtn.setGraphic(play_arrow_black); playbtn.setGraphic(play_arrow_black);
returnBtn.setGraphic(skip_previous_black); returnBtn.setGraphic(skip_previous_black);
forwardBtn.setGraphic(skip_next_black); forwardBtn.setGraphic(skip_next_black);
menubtn.setGraphic(menu_icon_black); menuHam.getStyleClass().add("jfx-hamburgerB");
} }
if(mode.equals("local")){ if(mode.equals("local")){
@ -934,9 +944,12 @@ public class MainWindowController {
updateBtn.setText(bundle.getString("checkUpdates")); updateBtn.setText(bundle.getString("checkUpdates"));
directoryBtn.setText(bundle.getString("chooseFolder")); directoryBtn.setText(bundle.getString("chooseFolder"));
streamingDirectoryBtn.setText(bundle.getString("chooseFolder")); streamingDirectoryBtn.setText(bundle.getString("chooseFolder"));
sizelbl.setText(bundle.getString("fontSize")); settingsHead1Label.setText(bundle.getString("settingsHead1Label"));
aulbl.setText(bundle.getString("autoUpdate")); mainColorLabel.setText(bundle.getString("mainColorLabel"));
versionlbl.setText(bundle.getString("version")+" "+version+" (Build: "+buildNumber+")"); fontsizeLabel.setText(bundle.getString("fontsizeLabel"));
localLabel.setText(bundle.getString("localLabel"));
autoUpdateLabel.setText(bundle.getString("autoUpdateLabel"));
versionLabel.setText(bundle.getString("version")+" "+version+" (Build: "+buildNumber+")");
columnTitel.setText(bundle.getString("columnName")); columnTitel.setText(bundle.getString("columnName"));
columnRating.setText(bundle.getString("columnRating")); columnRating.setText(bundle.getString("columnRating"));
columnStreamUrl.setText(bundle.getString("columnStreamUrl")); columnStreamUrl.setText(bundle.getString("columnStreamUrl"));

View File

@ -1 +0,0 @@
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */

View File

@ -1,24 +1,35 @@
# HomeFlix-Local_de_DE.properties German Local #HomeFlix-Local_de_DE.properties German Local
#main window translations
info = Info info = Info
settings = Einstellungen settings = Einstellungen
streamingSettings = Stream Einst. streamingSettings = Stream Einst.
tfPath = Pfad...
tfSearch = Suche... tfSearch = Suche...
openFolder = Ordner \u00F6ffnen openFolder = Ordner \u00F6ffnen
#settings translations
settingsHead1Label = HomeFlix Einstellungen
tfPath = Pfad...
chooseFolder = Ordner ausw\u00E4hlen chooseFolder = Ordner ausw\u00E4hlen
fontSize = Schriftgr\u00F6\u00DFe: mainColorLabel = Hauptfarbe:
fontsizeLabel = Schriftgr\u00F6\u00DFe:
localLabel = Sprache:
checkUpdates = Auf Update pr\u00FCfen checkUpdates = Auf Update pr\u00FCfen
checkingUpdates = Es wird nach Updates gesucht... checkingUpdates = Es wird nach Updates gesucht...
updateBtnavail = Update verf\u00FCgbar updateBtnavail = Update verf\u00FCgbar
updateBtnNotavail = Kein Update verf\u00FCgbar updateBtnNotavail = Kein Update verf\u00FCgbar
autoUpdate = beim Start nach Updates suchen: autoUpdateLabel = beim Start nach Updates suchen:
version = Version: version = Version:
#column translations
columnName = Name columnName = Name
columnRating = Bewertung columnRating = Bewertung
columnStreamUrl = Datei Name columnStreamUrl = Datei Name
columnResolution = Aufl\u00F6sung columnResolution = Aufl\u00F6sung
columnSeason = Staffel columnSeason = Staffel
columnYear = Jahr columnYear = Jahr
#error translations
errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorUpdateD = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not download update files (ndf)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz errorUpdateD = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not download update files (ndf)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
errorPlay = Beim \u00F6ffnen der Datei ist ein Fehler aufgetreten! \nError: could not open file (nof) \nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz errorPlay = Beim \u00F6ffnen der Datei ist ein Fehler aufgetreten! \nError: could not open file (nof) \nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz
@ -29,6 +40,8 @@ errorSave = Beim speichern der Einstellungen ist ein Fehler aufgetreten!
noFilmFound = Kein Film mit diesem Titel gefunden! noFilmFound = Kein Film mit diesem Titel gefunden!
vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt! vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt!
infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz
#textFlow translations
title = Titel title = Titel
year = Jahr year = Jahr
rating = Einstufung rating = Einstufung
@ -45,5 +58,6 @@ awards = Auszeichnungen
metascore = Metascore metascore = Metascore
imdbRating = IMDB-Bewertung imdbRating = IMDB-Bewertung
type = Type type = Type
firstStartHeader = Es ist kein Stammverzeichnis f\u00FCr Filme angegeben! firstStartHeader = Es ist kein Stammverzeichnis f\u00FCr Filme angegeben!
firstStartContent = Stammverzeichniss angeben? firstStartContent = Stammverzeichniss angeben?

View File

@ -1,24 +1,35 @@
# HomeFlix-Local_en_US.properties US-English Local and default #HomeFlix-Local_en_US.properties US-English Local and default
#main window translations
info = Info info = Info
settings = Settings settings = Settings
streamingSettings = Stream Settings streamingSettings = Stream Settings
tfPath = Path...
tfSearch = Search... tfSearch = Search...
openFolder = open Folder openFolder = open Folder
#settings translations
settingsHead1Label = HomeFlix Settings
tfPath = Path...
chooseFolder = choose Directory chooseFolder = choose Directory
fontSize = font size: mainColorLabel = main color:
fontsizeLabel = font size:
localLabel = local:
checkUpdates = check for updates checkUpdates = check for updates
checkingUpdates = checking for updates... checkingUpdates = checking for updates...
updateBtnavail = update available updateBtnavail = update available
updateBtnNotavail = no update available updateBtnNotavail = no update available
autoUpdate = check at startup for updates: autoUpdateLabel = check at startup for updates:
version = Version: version = Version:
#column translations
columnName = Name columnName = Name
columnRating = Rating columnRating = Rating
columnStreamUrl = File Name columnStreamUrl = File Name
columnResolution = Resolution columnResolution = Resolution
columnSeason = Season columnSeason = Season
columnYear = Year columnYear = Year
#error translations
errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorUpdateD = An error has occurred during update! \nError: could not download update files (ndf) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz errorUpdateD = An error has occurred during update! \nError: could not download update files (ndf) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
errorPlay = An error has occurred during opening the file! \nError: could not open file (nof) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz errorPlay = An error has occurred during opening the file! \nError: could not open file (nof) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz
@ -29,6 +40,8 @@ errorSave = An error occurred while saving the settings!
noFilmFound = No film with this title found! noFilmFound = No film with this title found!
vlcNotInstalled = VLC Media Player is required to play a movie! vlcNotInstalled = VLC Media Player is required to play a movie!
infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz
#textFlow translations
title = Title title = Title
year = Year year = Year
rating = Rating rating = Rating
@ -45,5 +58,6 @@ awards = Awards
metascore = Metascore metascore = Metascore
imdbRating = IMDB-Rating imdbRating = IMDB-Rating
type = Type type = Type
firstStartHeader = There is no root directory for movies! firstStartHeader = There is no root directory for movies!
firstStartContent = Specify a root directory? firstStartContent = Specify a root directory?