Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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";
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));
}
}
});
Expand All @@ -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"));
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object> {

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand All @@ -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);
}
}
});
Expand All @@ -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);
});
Expand All @@ -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)));
}
}
});
Expand All @@ -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<DawProject> projectProperty() {
Expand Down
2 changes: 1 addition & 1 deletion owlplug-client/src/main/resources/fxml/MainView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</Tab>
<Tab text="Projects" closable="false">
<graphic>
<FontIcon iconLiteral="mdi2a-archive-music-outline" />
<FontIcon iconLiteral="mdi2f-folder-music-outline" />
</graphic>
</Tab>
<Tab text="Options" closable="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<?import org.kordamp.ikonli.javafx.FontIcon?>
<VBox prefWidth="500.0" spacing="20.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.owlplug.core.controllers.dialogs.CrashRecoveryDialogController">
<HBox alignment="CENTER_LEFT" spacing="10.0">
<ImageView fitHeight="150.0" fitWidth="80.0" pickOnBounds="true" preserveRatio="true">
Expand Down Expand Up @@ -45,9 +46,7 @@
<HBox alignment="TOP_RIGHT" prefWidth="200.0" spacing="10.0" VBox.vgrow="NEVER">
<Button fx:id="openLogsButton" text="Open Logs">
<graphic>
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
<Image url="@../../icons/folder-grey-16.png" />
</ImageView>
<FontIcon iconLiteral="mdi2f-folder" />
</graphic>
</Button>
<Button fx:id="closeButton" text="Close this popup" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<?import javafx.scene.shape.*?>
<?import javafx.scene.text.*?>

<?import org.kordamp.ikonli.javafx.FontIcon?>
<VBox prefWidth="589.0" spacing="20.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.plugin.controllers.dialogs.NewLinkController">
<HBox alignment="CENTER" prefHeight="50.0" prefWidth="200.0" spacing="10.0">
Expand Down Expand Up @@ -52,15 +53,11 @@
<HBox.margin>
<Insets top="5.0"/>
</HBox.margin>
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
<Image url="@../../icons/folderlink-grey-16.png"/>
</ImageView>
<FontIcon iconLiteral="mdi2f-folder-arrow-right" />
<SVGPath
content="M 11,21.883 4.765,14.356 4,15 11.521,24 19,15 18.236,14.355 12,21.884 12,-9.6875002 h -1 z"
fill="#8f8f8f"/>
<ImageView fitHeight="16.0" fitWidth="16.0" pickOnBounds="true" preserveRatio="true">
<Image url="@../../icons/folder-grey-16.png"/>
</ImageView>
<FontIcon iconLiteral="mdi2f-folder" />
</VBox>
<VBox maxWidth="1.7976931348623157E308" spacing="20.0" HBox.hgrow="ALWAYS">
<VBox>
Expand Down
Loading
Loading