Browse Source

minor clean up

pull/12/head
Jannik 3 years ago
parent
commit
ea9e740552
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 27
      src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java

27
src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java

@ -374,6 +374,7 @@ public class MainWindowController {
});
// Change-listener for treeTableViewfilm
filmsTreeTable.getSelectionModel().selectedItemProperty().addListener((e, paramT1, paramT2) -> {
if (filmsTreeTable.getSelectionModel().getSelectedItem() == null) {
return;
@ -381,15 +382,15 @@ public class MainWindowController {
currentTableFilm = filmsTreeTable.getSelectionModel().getSelectedItem().getValue(); // set the current film object
indexTable = filmsTreeTable.getSelectionModel().getSelectedIndex(); // get selected items table index
last = indexTable - 1;
next = indexTable + 1;
for (FilmTabelDataType film : filmsList) {
if (film.equals(currentTableFilm)) {
indexList = filmsList.indexOf(film); // get selected items list index
}
}
last = indexTable - 1;
next = indexTable + 1;
if ((currentTableFilm.getCached().isAfter(lastValidCache)) && dbController.searchCacheByURL(getCurrentStreamUrl())) {
LOGGER.info("loading from cache: " + getCurrentTitle());
setSelectedFilmInfo(dbController.readCache(getCurrentStreamUrl()));
@ -505,11 +506,7 @@ public class MainWindowController {
@FXML
private void settingsBtnclicked() {
if (settingsScrollPane.isVisible()) {
settingsScrollPane.setVisible(false);
} else {
settingsScrollPane.setVisible(true);
}
settingsScrollPane.setVisible(!settingsScrollPane.isVisible());
}
@FXML
@ -686,8 +683,7 @@ public class MainWindowController {
BigInteger checkColor = new BigInteger("78909cff", 16);
if (usedColor.compareTo(checkColor) == -1) {
btnStyle = "-fx-button-type: RAISED; -fx-background-color: #" + XMLController.getColor()
+ "; -fx-text-fill: WHITE;";
btnStyle = "-fx-button-type: RAISED; -fx-background-color: #" + XMLController.getColor() + "; -fx-text-fill: WHITE;";
menuBtnStyle = "-fx-text-fill: WHITE;";
playbtn.setGraphic(new ImageView(new Image("icons/ic_play_arrow_white_18dp_1x.png")));
@ -697,8 +693,7 @@ public class MainWindowController {
menuHam.getStyleClass().clear();
menuHam.getStyleClass().add("jfx-hamburgerW");
} else {
btnStyle = "-fx-button-type: RAISED; -fx-background-color: #" + XMLController.getColor()
+ "; -fx-text-fill: BLACK;";
btnStyle = "-fx-button-type: RAISED; -fx-background-color: #" + XMLController.getColor() + "; -fx-text-fill: BLACK;";
menuBtnStyle = "-fx-text-fill: BLACK;";
playbtn.setGraphic(new ImageView(new Image("icons/ic_play_arrow_black_18dp_1x.png")));
@ -819,12 +814,10 @@ public class MainWindowController {
// clear the textFlow and add the new text
textFlow.clear();
// TODO rework
for (int i = 0; i < 20; i++) {
if (cacheData[i] != null && (i == 5 || i == 6) && cacheData[5].length() == 0) {
// do nothing
} else if (cacheData[i] != null) {
// if the cacheData exists and they are not empty add the text
if(cacheData[i] != null && cacheData[i].length() > 0) {
textFlow.addAll(nameText[i], new Text(cacheData[i] + "\n"));
}
}

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close