Skip to content
Snippets Groups Projects
Commit 0bbf4455 authored by tobias's avatar tobias
Browse files

Add Icons to Update Tab

parent 9fa4853d
No related branches found
No related tags found
No related merge requests found
PlayWall/assets/de/tobias/playpad/assets/files/class_obj.png

628 B

PlayWall/assets/de/tobias/playpad/assets/files/enum_obj.png

504 B

......@@ -70,6 +70,8 @@ settings.update.label.available=Verf
settings.update.button.search=Jetzt suchen
settings.update.button.install=Aktualisieren und neu starten
settings.update.label.channel=Update Kanal:
settings.update.label.infoC=Program
settings.update.label.infoE=Erweiterung
settings.button.finish=Fertig
settings.checkbox.activate=Aktivieren
......
......@@ -20,6 +20,12 @@
<CheckBox fx:id="automaticSearchCheckBox" layoutX="275.0" layoutY="183.0" mnemonicParsing="false" text="Automatisch" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" prefWidth="150.0" text="%settings.update.label.channel" />
<ComboBox fx:id="updateChannelComboBox" prefWidth="150.0" />
</children>
</HBox>
<HBox spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" layoutX="106.0" layoutY="222.0" prefWidth="150.0" />
......@@ -30,13 +36,17 @@
<HBox spacing="14.0">
<children>
<Label alignment="CENTER_RIGHT" prefWidth="150.0" text="%settings.update.label.available" />
<VBox spacing="14.0" HBox.hgrow="ALWAYS">
<children>
<ListView fx:id="openUpdateList" prefHeight="200.0" prefWidth="200.0" HBox.hgrow="ALWAYS" />
<HBox spacing="14.0">
<children>
<Label fx:id="infoCLabel" text="%settings.update.label.infoC" />
<Label fx:id="infoELabel" text="%settings.update.label.infoE" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="14.0">
<children>
<Label prefWidth="150.0" text="%settings.update.label.channel" />
<ComboBox fx:id="updateChannelComboBox" prefWidth="150.0" />
</children>
</VBox>
</children>
</HBox>
<HBox alignment="TOP_RIGHT">
......
package de.tobias.playpad.viewcontroller.cell;
import de.tobias.playpad.PlayPadUpdater;
import de.tobias.playpad.Strings;
import de.tobias.playpad.update.Updatable;
import de.tobias.utils.util.Localization;
import javafx.scene.control.ListCell;
import javafx.scene.image.ImageView;
public class UpdateCell extends ListCell<Updatable> {
......@@ -11,6 +13,11 @@ public class UpdateCell extends ListCell<Updatable> {
protected void updateItem(Updatable item, boolean empty) {
super.updateItem(item, empty);
if (!empty) {
if (item instanceof PlayPadUpdater) {
setGraphic(new ImageView("de/tobias/playpad/assets/files/class_obj.png"));
} else {
setGraphic(new ImageView("de/tobias/playpad/assets/files/enum_obj.png"));
}
setText(Localization.getString(Strings.UI_Dialog_Update_Cell, item.name(), item.getCurrentVersion(), item.getNewVersion()));
} else {
setText("");
......
......@@ -44,6 +44,7 @@ import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.Window;
......@@ -64,6 +65,9 @@ public class UpdateTabViewController extends SettingsTabViewController {
@FXML private ComboBox<UpdateChannel> updateChannelComboBox;
@FXML private Label infoCLabel;
@FXML private Label infoELabel;
// Placeholder for List
private ProgressIndicator progressIndecator;
private Label placeholderLabel;
......@@ -92,6 +96,9 @@ public class UpdateTabViewController extends SettingsTabViewController {
Profile.currentProfile().getProfileSettings().setUpdateChannel(c);
});
infoCLabel.setGraphic(new ImageView("de/tobias/playpad/assets/files/class_obj.png"));
infoELabel.setGraphic(new ImageView("de/tobias/playpad/assets/files/enum_obj.png"));
progressIndecator = new ProgressIndicator(-1);
progressIndecator.setMinSize(75, 75);
progressIndecator.setMaxSize(75, 75);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment