diff --git a/owlplug-client/src/main/java/com/owlplug/core/components/ApplicationDefaults.java b/owlplug-client/src/main/java/com/owlplug/core/components/ApplicationDefaults.java index 4047aa7f..b52e6867 100644 --- a/owlplug-client/src/main/java/com/owlplug/core/components/ApplicationDefaults.java +++ b/owlplug-client/src/main/java/com/owlplug/core/components/ApplicationDefaults.java @@ -60,7 +60,6 @@ public class ApplicationDefaults { public final Image owlplugLogoSmall = new Image( ApplicationDefaults.class.getResourceAsStream("/media/owlplug-logo-16.png")); - public final Image directoryImage = new Image(getClass().getResourceAsStream("/icons/folder-grey-16.png")); public final Image vst2Image = new Image(getClass().getResourceAsStream("/icons/vst2-blue-16.png")); public final Image vst3Image = new Image(getClass().getResourceAsStream("/icons/vst3-green-16.png")); public final Image auImage = new Image(getClass().getResourceAsStream("/icons/au-purple-16.png")); @@ -70,24 +69,26 @@ public class ApplicationDefaults { public final Image taskSuccessImage = new Image(getClass().getResourceAsStream("/icons/check-green-16.png")); public final Image taskFailImage = new Image(getClass().getResourceAsStream("/icons/cross-red-16.png")); public final Image taskRunningImage = new Image(getClass().getResourceAsStream("/icons/play-green-16.png")); - public final Image symlinkImage = new Image(getClass().getResourceAsStream("/icons/folderlink-grey-16.png")); - public final Image scanDirectoryImage = new Image(getClass().getResourceAsStream("/icons/foldersearch-grey-16.png")); public final Image verifiedSourceImage = new Image(getClass().getResourceAsStream("/icons/doublecheck-grey-16.png")); public final Image suggestedSourceImage = new Image( ApplicationDefaults.class.getResourceAsStream("/icons/check-grey-16.png")); public final Image openAudioLogoSmall = new Image(ApplicationDefaults.class.getResourceAsStream("/media/open-audio-16.png")); public final Image abletonLogoImage = new Image(getClass().getResourceAsStream("/icons/ableton-white-16.png")); public final Image reaperLogoImage = new Image(getClass().getResourceAsStream("/icons/reaper-white-16.png")); - public final Image studioOneLogoImage = new Image(getClass().getResourceAsStream("/icons/studioone-white-16.png")); public final Image errorIconImage = new Image( getClass().getResourceAsStream("/icons/error-red-16.png")); - public final Image linkIconImage = new Image( - getClass().getResourceAsStream("/icons/link-grey-16.png")); public final Image pluginPlaceholderImage = new Image( getClass().getResourceAsStream("/media/plugin-placeholder.png")); + public final Image abletonPlaceholderImage = new Image( + getClass().getResourceAsStream("/media/ableton-placeholder.png")); + public final Image reaperPlaceholderImage = new Image( + getClass().getResourceAsStream("/media/reaper-placeholder.png")); + public final Image studioOnePlaceholderImage = new Image( + getClass().getResourceAsStream("/media/studioone-placeholder.png")); + // CHECKSTYLE:ON public static final String VST_DIRECTORY_KEY = "VST_DIRECTORY"; @@ -201,6 +202,14 @@ public String getDefaultPluginPath(PluginFormat format) { return "/path/to/audio/plugins"; } + public Image getDawApplicationImage(DawApplication application) { + return switch (application) { + case ABLETON -> abletonPlaceholderImage; + case REAPER -> reaperPlaceholderImage; + case STUDIO_ONE -> studioOnePlaceholderImage; + }; + } + public String getVersion() { return env.getProperty("owlplug.version"); diff --git a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/ComponentInfoController.java b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/ComponentInfoController.java index 244768ac..4d778f94 100644 --- a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/ComponentInfoController.java +++ b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/ComponentInfoController.java @@ -23,6 +23,7 @@ import com.owlplug.plugin.model.Plugin; import com.owlplug.plugin.model.PluginComponent; import com.owlplug.plugin.services.PluginService; +import com.owlplug.plugin.ui.PluginFormatBadgeView; import com.owlplug.plugin.ui.PluginStateView; import java.util.ArrayList; import java.util.Optional; @@ -32,12 +33,12 @@ import javafx.scene.control.Label; import javafx.scene.effect.ColorAdjust; import javafx.scene.image.Image; -import javafx.scene.image.ImageView; import javafx.scene.layout.Background; import javafx.scene.layout.BackgroundImage; import javafx.scene.layout.BackgroundPosition; import javafx.scene.layout.BackgroundRepeat; import javafx.scene.layout.BackgroundSize; +import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -53,9 +54,7 @@ public class ComponentInfoController extends BaseController { @FXML private Pane pluginScreenshotPane; @FXML - private ImageView pluginFormatIcon; - @FXML - private Label pluginFormatLabel; + private HBox pluginFormatBadgeContainer; @FXML private Label pluginTitleLabel; @FXML @@ -88,8 +87,8 @@ public void initialize() { public void refresh() { PluginComponent component = componentProperty.get(); - pluginFormatIcon.setImage(this.getApplicationDefaults().getPluginFormatIcon(component.getPlugin().getFormat())); - pluginFormatLabel.setText(component.getPlugin().getFormat().getText() + " Plugin Component"); + pluginFormatBadgeContainer.getChildren().setAll( + new PluginFormatBadgeView(component.getPlugin().getFormat(), this.getApplicationDefaults())); pluginTitleLabel.setText(component.getName()); pluginNameLabel.setText(Optional.ofNullable(component.getDescriptiveName()).orElse(component.getName())); pluginVersionLabel.setText(Optional.ofNullable(component.getVersion()).orElse("Unknown")); diff --git a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginInfoController.java b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginInfoController.java index 5189ae10..b6563e66 100644 --- a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginInfoController.java +++ b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginInfoController.java @@ -129,7 +129,6 @@ public void initialize() { pluginProperty.addListener(e -> refresh()); pluginScreenshotPane.setEffect(new ColorAdjust(0, 0, -0.6, 0)); - openDirectoryButton.setGraphic(new ImageView(this.getApplicationDefaults().directoryImage)); openDirectoryButton.setText(""); openDirectoryButton.setOnAction(e -> { File pluginFile = new File(pluginPathLabel.getText()); diff --git a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginTableController.java b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginTableController.java index 0b80ac22..94632fa8 100644 --- a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginTableController.java +++ b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/PluginTableController.java @@ -50,6 +50,7 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; +import org.kordamp.ikonli.javafx.FontIcon; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; @@ -146,7 +147,7 @@ public void updateItem(String item, boolean empty) { setGraphic(null); } else { setText(item); - setGraphic(new ImageView(getApplicationDefaults().directoryImage)); + setGraphic(new FontIcon("mdi2f-folder")); } } }); @@ -163,7 +164,7 @@ public void updateItem(String item, boolean empty) { setGraphic(null); } else { setText(item); - setGraphic(new ImageView(getApplicationDefaults().scanDirectoryImage)); + setGraphic(new FontIcon("mdi2f-folder-search")); } } }); diff --git a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/SymlinkInfoController.java b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/SymlinkInfoController.java index bafccd06..f851c8f8 100644 --- a/owlplug-client/src/main/java/com/owlplug/plugin/controllers/SymlinkInfoController.java +++ b/owlplug-client/src/main/java/com/owlplug/plugin/controllers/SymlinkInfoController.java @@ -71,12 +71,10 @@ public class SymlinkInfoController extends BaseController { public void initialize() { symlinkProperty.addListener(e -> refresh()); - openLinkButton.setGraphic(new ImageView(this.getApplicationDefaults().symlinkImage)); openLinkButton.setOnAction(e -> { PlatformUtils.openFromDesktop(symlinkProperty.get().getPath()); }); - openTargetButton.setGraphic(new ImageView(this.getApplicationDefaults().directoryImage)); openTargetButton.setOnAction(e -> { PlatformUtils.openFromDesktop(symlinkProperty.get().getTargetPath()); }); diff --git a/owlplug-client/src/main/java/com/owlplug/plugin/ui/PluginTreeCell.java b/owlplug-client/src/main/java/com/owlplug/plugin/ui/PluginTreeCell.java index c577740d..09dd3e93 100644 --- a/owlplug-client/src/main/java/com/owlplug/plugin/ui/PluginTreeCell.java +++ b/owlplug-client/src/main/java/com/owlplug/plugin/ui/PluginTreeCell.java @@ -35,6 +35,7 @@ import javafx.scene.shape.Circle; import javafx.scene.text.Text; import javafx.scene.text.TextFlow; +import org.kordamp.ikonli.javafx.FontIcon; public class PluginTreeCell extends TreeCell { @@ -135,15 +136,15 @@ private void renderDirectory(IDirectory dir) { Node icon; if (dir instanceof Symlink) { - icon = new ImageView(applicationDefaults.symlinkImage); + icon = new FontIcon("mdi2f-folder-arrow-right"); } else if (dir instanceof PluginDirectory pluginDirectory) { if (pluginDirectory.isRootDirectory()) { - icon = new ImageView(applicationDefaults.scanDirectoryImage); + icon = new FontIcon("mdi2f-folder-search"); } else { - icon = new ImageView(applicationDefaults.directoryImage); + icon = new FontIcon("mdi2f-folder"); } } else { - icon = new ImageView(applicationDefaults.directoryImage); + icon = new FontIcon("mdi2f-folder"); } HBox hbox = new HBox(5); hbox.getChildren().add(icon); diff --git a/owlplug-client/src/main/java/com/owlplug/project/controllers/ProjectInfoController.java b/owlplug-client/src/main/java/com/owlplug/project/controllers/ProjectInfoController.java index afc02099..8d56349a 100644 --- a/owlplug-client/src/main/java/com/owlplug/project/controllers/ProjectInfoController.java +++ b/owlplug-client/src/main/java/com/owlplug/project/controllers/ProjectInfoController.java @@ -41,9 +41,17 @@ import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; +import javafx.scene.effect.ColorAdjust; import javafx.scene.image.ImageView; +import javafx.scene.layout.Background; +import javafx.scene.layout.BackgroundImage; +import javafx.scene.layout.BackgroundPosition; +import javafx.scene.layout.BackgroundRepeat; +import javafx.scene.layout.BackgroundSize; import javafx.scene.layout.HBox; +import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; +import org.kordamp.ikonli.javafx.FontIcon; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; @@ -60,6 +68,8 @@ public class ProjectInfoController extends BaseController { @FXML private VBox projectInfoPane; @FXML + private Pane projectScreenshotPane; + @FXML private Label projectNameLabel; @FXML private ImageView projectAppImageView; @@ -97,6 +107,8 @@ public class ProjectInfoController extends BaseController { @FXML public void initialize() { + + projectScreenshotPane.setEffect(new ColorAdjust(0, 0, -0.8, 0)); projectProperty.addListener(e -> refresh()); openDirectoryButton.setOnAction(e -> { File projectFile = new File(projectPathLabel.getText()); @@ -114,6 +126,7 @@ public void initialize() { // Set invisible by default if no project is selected. projectInfoPane.setVisible(false); + pluginTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY_FLEX_LAST_COLUMN); pluginTableNameColumn.setCellValueFactory(cellData -> { return new SimpleStringProperty(cellData.getValue().getName()); @@ -133,20 +146,33 @@ public void initialize() { @Override public void updateItem(String item, boolean empty) { super.updateItem(item, empty); - this.getStyleClass().remove("cell-unknown-link"); - this.getStyleClass().remove("cell-missing-link"); - this.getStyleClass().remove("cell-found-link"); + setText(null); if (item == null || empty) { - setText(null); + setGraphic(null); } else { - setText(item); - if (item.equals(LookupResult.MISSING.getValue())) { - this.getStyleClass().add("cell-missing-link"); - } else if (item.equals(LookupResult.FOUND.getValue())) { - this.getStyleClass().add("cell-found-link"); + String iconLiteral; + String iconStyleClass; + String labelStyleClass; + if (item.equals(LookupResult.FOUND.getValue())) { + iconLiteral = "mdi2c-check"; + iconStyleClass = "status-icon-found"; + labelStyleClass = "label-success"; + } else if (item.equals(LookupResult.MISSING.getValue())) { + iconLiteral = "mdi2a-alert-circle-outline"; + iconStyleClass = "status-icon-missing"; + labelStyleClass = "label-danger"; } else { - this.getStyleClass().add("cell-unknown-link"); + iconLiteral = "mdi2h-help-circle-outline"; + iconStyleClass = "status-icon-unknown"; + labelStyleClass = "label-disabled"; } + FontIcon icon = new FontIcon(iconLiteral); + icon.getStyleClass().add(iconStyleClass); + Label label = new Label(item); + label.getStyleClass().add(labelStyleClass); + HBox badge = new HBox(5, icon, label); + badge.getStyleClass().add("lookup-status-badge"); + setGraphic(badge); } } }); @@ -167,8 +193,8 @@ public void updateItem(Plugin item, boolean empty) { setGraphic(null); } else { Hyperlink link = new Hyperlink(); - link.setGraphic(new ImageView(getApplicationDefaults().linkIconImage)); - link.setOnAction(e -> { + link.setGraphic(new FontIcon("mdi2p-power-plug-outline")); + link.setOnAction(ev -> { pluginsController.selectPluginById(item.getId()); mainController.navigateToMainTab(MainController.PLUGINS_TAB_INDEX); }); @@ -187,7 +213,7 @@ public void updateItem(PluginFormat item, boolean empty) { } else { setText(null); setGraphic(new HBox(new PluginFormatBadgeView( - item, getApplicationDefaults(), PluginFormatBadgeView.DisplayMode.ICON_ONLY))); + item, getApplicationDefaults(), PluginFormatBadgeView.DisplayMode.DEFAULT))); } } }); @@ -210,6 +236,11 @@ public void refresh() { pluginTable.setItems(FXCollections.observableList(project.getPlugins().stream().toList())); + BackgroundImage bgImg = new BackgroundImage(this.getApplicationDefaults().getDawApplicationImage(project.getApplication()), + BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER, + new BackgroundSize(BackgroundSize.AUTO, BackgroundSize.AUTO, false, false, true, true)); + projectScreenshotPane.setBackground(new Background(bgImg)); + } public ObjectProperty projectProperty() { diff --git a/owlplug-client/src/main/resources/fxml/MainView.fxml b/owlplug-client/src/main/resources/fxml/MainView.fxml index 49db49c0..5ae46a7a 100644 --- a/owlplug-client/src/main/resources/fxml/MainView.fxml +++ b/owlplug-client/src/main/resources/fxml/MainView.fxml @@ -39,7 +39,7 @@ - + diff --git a/owlplug-client/src/main/resources/fxml/dialogs/CrashRecoveryView.fxml b/owlplug-client/src/main/resources/fxml/dialogs/CrashRecoveryView.fxml index 545908b9..a0c15463 100644 --- a/owlplug-client/src/main/resources/fxml/dialogs/CrashRecoveryView.fxml +++ b/owlplug-client/src/main/resources/fxml/dialogs/CrashRecoveryView.fxml @@ -6,6 +6,7 @@ + @@ -45,9 +46,7 @@ - + + + - - + + - - - - - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + minWidth="-Infinity" prefHeight="100.0" prefWidth="440.0" VBox.vgrow="SOMETIMES" + styleClass="dense"> + + + + - + - + \ No newline at end of file diff --git a/owlplug-client/src/main/resources/fxml/plugins/PluginsView.fxml b/owlplug-client/src/main/resources/fxml/plugins/PluginsView.fxml index 206e9f95..ea80ac0e 100644 --- a/owlplug-client/src/main/resources/fxml/plugins/PluginsView.fxml +++ b/owlplug-client/src/main/resources/fxml/plugins/PluginsView.fxml @@ -19,8 +19,7 @@ - - - diff --git a/owlplug-client/src/main/resources/fxml/plugins/SymlinkInfoView.fxml b/owlplug-client/src/main/resources/fxml/plugins/SymlinkInfoView.fxml index d587bd44..cab7972c 100644 --- a/owlplug-client/src/main/resources/fxml/plugins/SymlinkInfoView.fxml +++ b/owlplug-client/src/main/resources/fxml/plugins/SymlinkInfoView.fxml @@ -25,16 +25,12 @@ - + - + + + @@ -33,6 +35,8 @@ + + - + + + - - + + - - - - - - - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + - + \ No newline at end of file diff --git a/owlplug-client/src/main/resources/icons/folder-grey-16.png b/owlplug-client/src/main/resources/icons/folder-grey-16.png deleted file mode 100644 index aec24f74..00000000 Binary files a/owlplug-client/src/main/resources/icons/folder-grey-16.png and /dev/null differ diff --git a/owlplug-client/src/main/resources/icons/folderlink-grey-16.png b/owlplug-client/src/main/resources/icons/folderlink-grey-16.png deleted file mode 100644 index f6fbfff0..00000000 Binary files a/owlplug-client/src/main/resources/icons/folderlink-grey-16.png and /dev/null differ diff --git a/owlplug-client/src/main/resources/icons/foldersearch-grey-16.png b/owlplug-client/src/main/resources/icons/foldersearch-grey-16.png deleted file mode 100644 index 06bbbada..00000000 Binary files a/owlplug-client/src/main/resources/icons/foldersearch-grey-16.png and /dev/null differ diff --git a/owlplug-client/src/main/resources/icons/link-grey-16.png b/owlplug-client/src/main/resources/icons/link-grey-16.png deleted file mode 100644 index 47957dd2..00000000 Binary files a/owlplug-client/src/main/resources/icons/link-grey-16.png and /dev/null differ diff --git a/owlplug-client/src/main/resources/media/ableton-placeholder.png b/owlplug-client/src/main/resources/media/ableton-placeholder.png new file mode 100644 index 00000000..909ea284 Binary files /dev/null and b/owlplug-client/src/main/resources/media/ableton-placeholder.png differ diff --git a/owlplug-client/src/main/resources/media/reaper-placeholder.png b/owlplug-client/src/main/resources/media/reaper-placeholder.png new file mode 100644 index 00000000..f8994b6b Binary files /dev/null and b/owlplug-client/src/main/resources/media/reaper-placeholder.png differ diff --git a/owlplug-client/src/main/resources/media/studioone-placeholder.png b/owlplug-client/src/main/resources/media/studioone-placeholder.png new file mode 100644 index 00000000..282b62fc Binary files /dev/null and b/owlplug-client/src/main/resources/media/studioone-placeholder.png differ diff --git a/owlplug-client/src/main/resources/owlplug.css b/owlplug-client/src/main/resources/owlplug.css index 7d6e13bd..238bdf0d 100644 --- a/owlplug-client/src/main/resources/owlplug.css +++ b/owlplug-client/src/main/resources/owlplug.css @@ -132,23 +132,21 @@ Text { } -.table-view .cell-unknown-link, -.table-view .cell-unknown-link:hover { - -fx-background-color: disabled-color; +.lookup-status-badge { + -fx-alignment: CENTER_LEFT; + -fx-spacing: 5px; } -.table-view .cell-found-link, -.table-view .cell-found-link:hover { - -fx-background-color: success-color; +.status-icon-found { + -fx-icon-color: success-color; } -.table-view .cell-missing-link, -.table-view .cell-missing-link:hover { - -fx-background-color: danger-color; +.status-icon-missing { + -fx-icon-color: danger-color; } -.table-view { - -fx-border-width: 0px; +.status-icon-unknown { + -fx-icon-color: disabled-color; } .search-bar-chip-view { @@ -406,6 +404,26 @@ ProgressIndicator { -fx-text-fill: disabled-color; } +/* Plugin info view */ + +.info-field-label { + -fx-font-size: 10px; + -fx-font-weight: bold; + -fx-text-fill: disabled-color; +} + +.info-field-value { + -fx-font-size: 13px; + -fx-text-fill: text-emphase-color; +} + +.plugin-action-bar { + -fx-background-color: -color-bg-subtle; + -fx-border-width: 0 0 1 0; + -fx-border-color: -color-border-default; + -fx-padding: 8 16 8 16; +} + .package-bloc-title { -fx-background-color: rgba(0, 0, 0, 0.85); -fx-padding: 10, 10, 10, 10;