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 @@ -22,6 +22,7 @@
import com.owlplug.core.model.RuntimePlatform;
import com.owlplug.explore.model.RemotePackage;
import com.owlplug.plugin.model.PluginFormat;
import com.owlplug.plugin.model.PluginType;
import com.owlplug.project.model.DawApplication;
import java.io.BufferedReader;
import java.io.InputStream;
Expand All @@ -31,6 +32,7 @@
import java.util.List;
import java.util.stream.Collectors;
import javafx.scene.image.Image;
import org.kordamp.ikonli.javafx.FontIcon;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -68,13 +70,7 @@ 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 rocketImage = new Image(getClass().getResourceAsStream("/icons/rocket-white-64.png"));
public final Image serverImage = new Image(getClass().getResourceAsStream("/icons/server-white-32.png"));
public final Image instrumentImage = new Image(getClass().getResourceAsStream("/icons/synth-white-16.png"));
public final Image effectImage = new Image(getClass().getResourceAsStream("/icons/effect-white-16.png"));
public final Image tagImage = new Image(getClass().getResourceAsStream("/icons/tag-white-16.png"));
public final Image symlinkImage = new Image(getClass().getResourceAsStream("/icons/folderlink-grey-16.png"));
public final Image userImage = new Image(getClass().getResourceAsStream("/icons/user-white-32.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(
Expand Down Expand Up @@ -142,29 +138,23 @@ public RuntimePlatform getRuntimePlatform() {
* @return Associated icon
*/
public Image getPluginFormatIcon(PluginFormat format) {

if (format == null) {
return pluginComponentImage;
}
return switch (format) {
case VST2 -> vst2Image;
case VST3 -> vst3Image;
case AU -> auImage;
case LV2 -> lv2Image;
default -> vst2Image;
default -> pluginComponentImage;
};
}


/**
* Returns plugin icon based on plugin format.
*
* @param remotePackage - package
* @return Associated icon
*/
public Image getPackageTypeIcon(RemotePackage remotePackage) {

return switch (remotePackage.getType()) {
case INSTRUMENT -> instrumentImage;
case EFFECT -> effectImage;
default -> null;
public String getPackageTypeIconLiteral(PluginType type) {
return switch (type) {
case INSTRUMENT -> "mdi2p-piano";
case EFFECT -> "mdi2w-waveform";
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import org.kordamp.ikonli.javafx.FontIcon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Controller;
Expand Down Expand Up @@ -139,10 +139,9 @@ protected void onDialogShow() {
protected DialogLayout getLayout() {
Label title = new Label("Owlplug is almost ready !");
title.getStyleClass().add("heading-3");
ImageView iv = new ImageView(this.getApplicationDefaults().rocketImage);
iv.setFitHeight(20);
iv.setFitWidth(20);
title.setGraphic(iv);
FontIcon icon = new FontIcon("mdi2r-rocket-launch-outline");
icon.setIconSize(20);
title.setGraphic(icon);
DialogLayout layout = new DialogLayout();
layout.setHeading(title);
layout.setBody(lazyViewRegistry.get(LazyViewRegistry.WELCOME_VIEW));
Expand Down
Loading