From 5c9ebc3563c5db9c4f08cf5e5f0aab21a8976f10 Mon Sep 17 00:00:00 2001 From: ShadelessFox Date: Thu, 14 Mar 2024 03:07:08 +0100 Subject: [PATCH] Application: Update icons and theme; upgrade to FlatLaf 3.4 --- .../java/com/shade/decima/ui/Application.java | 76 ++++++++++--------- .../ui/data/handlers/ModelValueHandler.java | 22 ++++++ .../ui/data/handlers/TextureValueHandler.java | 21 +++++ .../audio/controls/AudioPlayerComponent.java | 8 +- .../editor/binary/BinaryEditorProvider.java | 2 +- .../ui/editor/core/CoreEditorProvider.java | 2 +- .../decima/ui/editor/core/CoreNodeFile.java | 3 +- .../ui/navigator/impl/NavigatorFileNode.java | 4 +- .../navigator/impl/NavigatorProjectNode.java | 2 +- .../decima/ui/views/ViewManagerImpl.java | 2 +- .../resources/icons/actions/add_element.svg | 9 ++- .../main/resources/icons/actions/contains.svg | 7 +- .../icons/actions/duplicate_element.svg | 9 ++- .../src/main/resources/icons/actions/edit.svg | 7 +- .../resources/icons/actions/edit_modal.svg | 14 +++- .../main/resources/icons/actions/export.svg | 10 ++- .../icons/{toolbars => actions}/hide.svg | 3 +- .../main/resources/icons/actions/import.svg | 10 ++- .../resources/icons/actions/monitorActive.svg | 4 - .../icons/actions/monitorInactive.svg | 3 - .../main/resources/icons/actions/navigate.svg | 7 +- .../src/main/resources/icons/actions/next.svg | 7 ++ .../main/resources/icons/actions/normals.svg | 8 +- .../icons/actions/null_terminator.svg | 7 +- .../main/resources/icons/actions/outline.svg | 12 ++- .../src/main/resources/icons/actions/pack.svg | 8 +- .../main/resources/icons/actions/pause.svg | 7 ++ .../src/main/resources/icons/actions/play.svg | 4 + .../main/resources/icons/actions/previous.svg | 7 ++ .../src/main/resources/icons/actions/redo.svg | 6 +- .../icons/actions/remove_element.svg | 9 ++- .../src/main/resources/icons/actions/save.svg | 9 ++- .../main/resources/icons/actions/search.svg | 6 +- .../main/resources/icons/actions/shading.svg | 10 ++- .../resources/icons/actions/split_down.svg | 7 +- .../resources/icons/actions/split_right.svg | 7 +- .../src/main/resources/icons/actions/star.svg | 3 +- .../resources/icons/actions/tab_close.svg | 14 +++- .../resources/icons/actions/tab_close_all.svg | 17 ++++- .../icons/actions/tab_close_others.svg | 18 ++++- .../icons/actions/tab_close_uninitialized.svg | 18 ++++- .../src/main/resources/icons/actions/undo.svg | 6 +- .../resources/icons/actions/wireframe.svg | 8 +- .../main/resources/icons/actions/zoom_fit.svg | 9 ++- .../main/resources/icons/actions/zoom_in.svg | 7 +- .../main/resources/icons/actions/zoom_out.svg | 7 +- .../src/main/resources/icons/application.svg | 19 +++-- .../main/resources/icons/editors/binary.svg | 11 --- .../src/main/resources/icons/editors/core.svg | 6 -- .../src/main/resources/icons/files/binary.svg | 12 +++ .../src/main/resources/icons/files/core.svg | 9 +++ .../src/main/resources/icons/guidelines.md | 9 +++ .../main/resources/icons/nodes/archive.svg | 7 +- .../src/main/resources/icons/nodes/array.svg | 13 ++-- .../main/resources/icons/nodes/boolean.svg | 7 +- .../main/resources/icons/nodes/decimal.svg | 9 ++- .../src/main/resources/icons/nodes/enum.svg | 15 ++-- .../src/main/resources/icons/nodes/file.svg | 7 ++ .../src/main/resources/icons/nodes/folder.svg | 4 + .../main/resources/icons/nodes/integer.svg | 9 ++- .../src/main/resources/icons/nodes/model.svg | 10 +++ .../resources/icons/nodes/monitorActive.svg | 7 ++ .../resources/icons/nodes/monitorInactive.svg | 4 + .../src/main/resources/icons/nodes/object.svg | 10 ++- .../main/resources/icons/nodes/reference.svg | 17 +++-- .../src/main/resources/icons/nodes/string.svg | 9 ++- .../main/resources/icons/nodes/texture.svg | 8 ++ .../src/main/resources/icons/nodes/uuid.svg | 17 +++-- .../src/main/resources/icons/overlays/add.svg | 3 +- .../main/resources/icons/overlays/modify.svg | 3 +- .../main/resources/icons/toolbars/next.svg | 4 - .../main/resources/icons/toolbars/pause.svg | 4 - .../main/resources/icons/toolbars/play.svg | 3 - .../resources/icons/toolbars/previous.svg | 4 - modules/platform-ui/build.gradle | 4 +- .../ui/controls/ColoredListCellRenderer.java | 15 ---- .../ui/controls/ColoredTreeCellRenderer.java | 8 -- .../shade/platform/ui/icons/OverlaidIcon.java | 16 ---- .../com/shade/platform/ui/util/UIUtils.java | 35 --------- .../resources/themes/FlatDarkLaf.properties | 6 +- .../main/resources/themes/FlatLaf.properties | 21 +++-- 81 files changed, 501 insertions(+), 290 deletions(-) create mode 100644 modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/ModelValueHandler.java create mode 100644 modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/TextureValueHandler.java rename modules/decima-ui/src/main/resources/icons/{toolbars => actions}/hide.svg (50%) delete mode 100644 modules/decima-ui/src/main/resources/icons/actions/monitorActive.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/actions/monitorInactive.svg create mode 100644 modules/decima-ui/src/main/resources/icons/actions/next.svg create mode 100644 modules/decima-ui/src/main/resources/icons/actions/pause.svg create mode 100644 modules/decima-ui/src/main/resources/icons/actions/play.svg create mode 100644 modules/decima-ui/src/main/resources/icons/actions/previous.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/editors/binary.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/editors/core.svg create mode 100644 modules/decima-ui/src/main/resources/icons/files/binary.svg create mode 100644 modules/decima-ui/src/main/resources/icons/files/core.svg create mode 100644 modules/decima-ui/src/main/resources/icons/guidelines.md create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/file.svg create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/folder.svg create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/model.svg create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/monitorActive.svg create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/monitorInactive.svg create mode 100644 modules/decima-ui/src/main/resources/icons/nodes/texture.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/toolbars/next.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/toolbars/pause.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/toolbars/play.svg delete mode 100644 modules/decima-ui/src/main/resources/icons/toolbars/previous.svg diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/Application.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/Application.java index 15bd07850..0872816c4 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/Application.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/Application.java @@ -337,60 +337,68 @@ private void configureUI() { log.error("Failed to setup look and feel '" + settings.themeClassName + "'l: " + e); } + UIManager.put("Action.addElementIcon", new FlatSVGIcon("icons/actions/add_element.svg")); + UIManager.put("Action.closeAllIcon", new FlatSVGIcon("icons/actions/tab_close_all.svg")); + UIManager.put("Action.closeIcon", new FlatSVGIcon("icons/actions/tab_close.svg")); + UIManager.put("Action.closeOthersIcon", new FlatSVGIcon("icons/actions/tab_close_others.svg")); + UIManager.put("Action.closeUninitializedIcon", new FlatSVGIcon("icons/actions/tab_close_uninitialized.svg")); UIManager.put("Action.containsIcon", new FlatSVGIcon("icons/actions/contains.svg")); - UIManager.put("Action.monitorActiveIcon", new FlatSVGIcon("icons/actions/monitorActive.svg")); - UIManager.put("Action.monitorInactiveIcon", new FlatSVGIcon("icons/actions/monitorInactive.svg")); + UIManager.put("Action.duplicateElementIcon", new FlatSVGIcon("icons/actions/duplicate_element.svg")); UIManager.put("Action.editIcon", new FlatSVGIcon("icons/actions/edit.svg")); UIManager.put("Action.editModalIcon", new FlatSVGIcon("icons/actions/edit_modal.svg")); UIManager.put("Action.exportIcon", new FlatSVGIcon("icons/actions/export.svg")); + UIManager.put("Action.hideIcon", new FlatSVGIcon("icons/actions/hide.svg")); UIManager.put("Action.importIcon", new FlatSVGIcon("icons/actions/import.svg")); + UIManager.put("Action.navigateIcon", new FlatSVGIcon("icons/actions/navigate.svg")); + UIManager.put("Action.nextIcon", new FlatSVGIcon("icons/actions/next.svg")); + UIManager.put("Action.normalsIcon", new FlatSVGIcon("icons/actions/normals.svg")); + UIManager.put("Action.nullTerminatorIcon", new FlatSVGIcon("icons/actions/null_terminator.svg")); + UIManager.put("Action.outlineIcon", new FlatSVGIcon("icons/actions/outline.svg")); UIManager.put("Action.packIcon", new FlatSVGIcon("icons/actions/pack.svg")); - UIManager.put("Action.undoIcon", new FlatSVGIcon("icons/actions/undo.svg")); + UIManager.put("Action.pauseIcon", new FlatSVGIcon("icons/actions/pause.svg")); + UIManager.put("Action.playIcon", new FlatSVGIcon("icons/actions/play.svg")); + UIManager.put("Action.previousIcon", new FlatSVGIcon("icons/actions/previous.svg")); UIManager.put("Action.redoIcon", new FlatSVGIcon("icons/actions/redo.svg")); + UIManager.put("Action.removeElementIcon", new FlatSVGIcon("icons/actions/remove_element.svg")); UIManager.put("Action.saveIcon", new FlatSVGIcon("icons/actions/save.svg")); UIManager.put("Action.searchIcon", new FlatSVGIcon("icons/actions/search.svg")); - UIManager.put("Action.closeIcon", new FlatSVGIcon("icons/actions/tab_close.svg")); - UIManager.put("Action.closeAllIcon", new FlatSVGIcon("icons/actions/tab_close_all.svg")); - UIManager.put("Action.closeOthersIcon", new FlatSVGIcon("icons/actions/tab_close_others.svg")); - UIManager.put("Action.closeUninitializedIcon", new FlatSVGIcon("icons/actions/tab_close_uninitialized.svg")); - UIManager.put("Action.splitRightIcon", new FlatSVGIcon("icons/actions/split_right.svg")); + UIManager.put("Action.shadingIcon", new FlatSVGIcon("icons/actions/shading.svg")); UIManager.put("Action.splitDownIcon", new FlatSVGIcon("icons/actions/split_down.svg")); + UIManager.put("Action.splitRightIcon", new FlatSVGIcon("icons/actions/split_right.svg")); UIManager.put("Action.starIcon", new FlatSVGIcon("icons/actions/star.svg")); + UIManager.put("Action.undoIcon", new FlatSVGIcon("icons/actions/undo.svg")); + UIManager.put("Action.wireframeIcon", new FlatSVGIcon("icons/actions/wireframe.svg")); + UIManager.put("Action.zoomFitIcon", new FlatSVGIcon("icons/actions/zoom_fit.svg")); UIManager.put("Action.zoomInIcon", new FlatSVGIcon("icons/actions/zoom_in.svg")); UIManager.put("Action.zoomOutIcon", new FlatSVGIcon("icons/actions/zoom_out.svg")); - UIManager.put("Action.zoomFitIcon", new FlatSVGIcon("icons/actions/zoom_fit.svg")); - UIManager.put("Action.addElementIcon", new FlatSVGIcon("icons/actions/add_element.svg")); - UIManager.put("Action.removeElementIcon", new FlatSVGIcon("icons/actions/remove_element.svg")); - UIManager.put("Action.duplicateElementIcon", new FlatSVGIcon("icons/actions/duplicate_element.svg")); - UIManager.put("Action.normalsIcon", new FlatSVGIcon("icons/actions/normals.svg")); - UIManager.put("Action.shadingIcon", new FlatSVGIcon("icons/actions/shading.svg")); - UIManager.put("Action.wireframeIcon", new FlatSVGIcon("icons/actions/wireframe.svg")); - UIManager.put("Action.navigateIcon", new FlatSVGIcon("icons/actions/navigate.svg")); - UIManager.put("Action.outlineIcon", new FlatSVGIcon("icons/actions/outline.svg")); - UIManager.put("Action.nullTerminatorIcon", new FlatSVGIcon("icons/actions/null_terminator.svg")); - - UIManager.put("Editor.binaryIcon", new FlatSVGIcon("icons/editors/binary.svg")); - UIManager.put("Editor.coreIcon", new FlatSVGIcon("icons/editors/core.svg")); - + UIManager.put("File.binaryIcon", new FlatSVGIcon("icons/files/binary.svg")); + UIManager.put("File.coreIcon", new FlatSVGIcon("icons/files/core.svg")); UIManager.put("Node.archiveIcon", new FlatSVGIcon("icons/nodes/archive.svg")); - UIManager.put("Node.enumIcon", new FlatSVGIcon("icons/nodes/enum.svg")); - UIManager.put("Node.uuidIcon", new FlatSVGIcon("icons/nodes/uuid.svg")); UIManager.put("Node.arrayIcon", new FlatSVGIcon("icons/nodes/array.svg")); - UIManager.put("Node.objectIcon", new FlatSVGIcon("icons/nodes/object.svg")); - UIManager.put("Node.referenceIcon", new FlatSVGIcon("icons/nodes/reference.svg")); + UIManager.put("Node.booleanIcon", new FlatSVGIcon("icons/nodes/boolean.svg")); UIManager.put("Node.decimalIcon", new FlatSVGIcon("icons/nodes/decimal.svg")); + UIManager.put("Node.enumIcon", new FlatSVGIcon("icons/nodes/enum.svg")); UIManager.put("Node.integerIcon", new FlatSVGIcon("icons/nodes/integer.svg")); + UIManager.put("Node.modelIcon", new FlatSVGIcon("icons/nodes/model.svg")); + UIManager.put("Node.monitorActiveIcon", new FlatSVGIcon("icons/nodes/monitorActive.svg")); + UIManager.put("Node.monitorInactiveIcon", new FlatSVGIcon("icons/nodes/monitorInactive.svg")); + UIManager.put("Node.objectIcon", new FlatSVGIcon("icons/nodes/object.svg")); + UIManager.put("Node.referenceIcon", new FlatSVGIcon("icons/nodes/reference.svg")); UIManager.put("Node.stringIcon", new FlatSVGIcon("icons/nodes/string.svg")); - UIManager.put("Node.booleanIcon", new FlatSVGIcon("icons/nodes/boolean.svg")); - + UIManager.put("Node.textureIcon", new FlatSVGIcon("icons/nodes/texture.svg")); + UIManager.put("Node.uuidIcon", new FlatSVGIcon("icons/nodes/uuid.svg")); UIManager.put("Overlay.addIcon", new FlatSVGIcon("icons/overlays/add.svg")); UIManager.put("Overlay.modifyIcon", new FlatSVGIcon("icons/overlays/modify.svg")); - - UIManager.put("Toolbar.hideIcon", new FlatSVGIcon("icons/toolbars/hide.svg")); - UIManager.put("Toolbar.pauseIcon", new FlatSVGIcon("icons/toolbars/pause.svg")); - UIManager.put("Toolbar.playIcon", new FlatSVGIcon("icons/toolbars/play.svg")); - UIManager.put("Toolbar.previousIcon", new FlatSVGIcon("icons/toolbars/previous.svg")); - UIManager.put("Toolbar.nextIcon", new FlatSVGIcon("icons/toolbars/next.svg")); + UIManager.put("Tree.closedIcon", new FlatSVGIcon("icons/nodes/folder.svg")); + UIManager.put("Tree.leafIcon", new FlatSVGIcon("icons/nodes/file.svg")); + UIManager.put("Tree.openIcon", new FlatSVGIcon("icons/nodes/folder.svg")); + + // See resources/icons/guidelines.md for more information + final FlatSVGIcon.ColorFilter filter = FlatSVGIcon.ColorFilter.getInstance(); + filter.add(new Color(0x6C707E), UIColor.named("Icon.baseColor")); + filter.add(new Color(0xEBECF0), UIColor.named("Icon.baseColor2")); + filter.add(new Color(0x3574F0), UIColor.named("Icon.accentColor")); + filter.add(new Color(0xE7EFFD), UIColor.named("Icon.accentColor2")); } private void saveState() { diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/ModelValueHandler.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/ModelValueHandler.java new file mode 100644 index 000000000..75678f1df --- /dev/null +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/ModelValueHandler.java @@ -0,0 +1,22 @@ +package com.shade.decima.ui.data.handlers; + +import com.shade.decima.model.rtti.RTTIType; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Selector; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Type; +import com.shade.util.NotNull; +import com.shade.util.Nullable; + +import javax.swing.*; + +@ValueHandlerRegistration(value = { + @Selector(type = @Type(name = "ModelResource")), + @Selector(type = @Type(name = "MeshResourceBase")), +}) +public class ModelValueHandler extends ObjectValueHandler { + @Nullable + @Override + public Icon getIcon(@NotNull RTTIType type) { + return UIManager.getIcon("Node.modelIcon"); + } +} diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/TextureValueHandler.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/TextureValueHandler.java new file mode 100644 index 000000000..89be97d4f --- /dev/null +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/handlers/TextureValueHandler.java @@ -0,0 +1,21 @@ +package com.shade.decima.ui.data.handlers; + +import com.shade.decima.model.rtti.RTTIType; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Selector; +import com.shade.decima.ui.data.registry.ValueHandlerRegistration.Type; +import com.shade.util.NotNull; +import com.shade.util.Nullable; + +import javax.swing.*; + +@ValueHandlerRegistration(value = { + @Selector(type = @Type(name = "Texture")), +}) +public class TextureValueHandler extends ObjectValueHandler { + @Nullable + @Override + public Icon getIcon(@NotNull RTTIType type) { + return UIManager.getIcon("Node.textureIcon"); + } +} diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/audio/controls/AudioPlayerComponent.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/audio/controls/AudioPlayerComponent.java index 0dc5367e1..5bb46089b 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/audio/controls/AudioPlayerComponent.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/data/viewer/audio/controls/AudioPlayerComponent.java @@ -174,7 +174,7 @@ private void setProgress(double progress) { private class PreviousTrackAction extends AbstractAction { public PreviousTrackAction() { - putValue(SMALL_ICON, UIManager.getIcon("Toolbar.previousIcon")); + putValue(SMALL_ICON, UIManager.getIcon("Action.previousIcon")); putValue(SHORT_DESCRIPTION, "Previous"); } @@ -189,7 +189,7 @@ public void actionPerformed(ActionEvent e) { private class NextTrackAction extends AbstractAction { public NextTrackAction() { - putValue(SMALL_ICON, UIManager.getIcon("Toolbar.nextIcon")); + putValue(SMALL_ICON, UIManager.getIcon("Action.nextIcon")); putValue(SHORT_DESCRIPTION, "Next"); } @@ -219,10 +219,10 @@ public void actionPerformed(ActionEvent e) { public void setPlaying(boolean playing) { if (playing) { - putValue(SMALL_ICON, UIManager.getIcon("Toolbar.pauseIcon")); + putValue(SMALL_ICON, UIManager.getIcon("Action.pauseIcon")); putValue(SHORT_DESCRIPTION, "Pause"); } else { - putValue(SMALL_ICON, UIManager.getIcon("Toolbar.playIcon")); + putValue(SMALL_ICON, UIManager.getIcon("Action.playIcon")); putValue(SHORT_DESCRIPTION, "Play"); } diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/binary/BinaryEditorProvider.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/binary/BinaryEditorProvider.java index 487b0dddf..b3e552ac8 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/binary/BinaryEditorProvider.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/binary/BinaryEditorProvider.java @@ -42,6 +42,6 @@ public String getName() { @Nullable @Override public Icon getIcon() { - return UIManager.getIcon("Editor.binaryIcon"); + return UIManager.getIcon("File.binaryIcon"); } } diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreEditorProvider.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreEditorProvider.java index 57c775c83..7363012f4 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreEditorProvider.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreEditorProvider.java @@ -36,6 +36,6 @@ public String getName() { @Nullable @Override public Icon getIcon() { - return UIManager.getIcon("Editor.coreIcon"); + return UIManager.getIcon("File.coreIcon"); } } diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreNodeFile.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreNodeFile.java index b278c4337..90c0df16d 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreNodeFile.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/editor/core/CoreNodeFile.java @@ -11,6 +11,7 @@ import com.shade.util.NotNull; import com.shade.util.Nullable; +import javax.swing.*; import java.util.ArrayList; import java.util.Comparator; import java.util.stream.Collector; @@ -91,7 +92,7 @@ public String getLabel() { @Nullable @Override public Icon getIcon() { - return UIManager.getIcon("Editor.coreIcon"); + return UIManager.getIcon("File.coreIcon"); } @NotNull diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorFileNode.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorFileNode.java index ae8e55697..e9b21ff5d 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorFileNode.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorFileNode.java @@ -38,8 +38,8 @@ public String getLabel() { @Override public Icon getIcon() { return switch (extension) { - case "core" -> UIManager.getIcon("Editor.coreIcon"); - case "stream" -> UIManager.getIcon("Editor.binaryIcon"); + case "core" -> UIManager.getIcon("File.coreIcon"); + case "stream" -> UIManager.getIcon("File.binaryIcon"); default -> super.getIcon(); }; } diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorProjectNode.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorProjectNode.java index 800c6be0b..54833273b 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorProjectNode.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/navigator/impl/NavigatorProjectNode.java @@ -95,7 +95,7 @@ protected NavigatorNode[] loadChildren(@NotNull ProgressMonitor monitor) throws @Nullable @Override public Icon getIcon() { - return UIManager.getIcon(project != null ? "Action.monitorActiveIcon" : "Action.monitorInactiveIcon"); + return UIManager.getIcon(project != null ? "Node.monitorActiveIcon" : "Node.monitorInactiveIcon"); } @NotNull diff --git a/modules/decima-ui/src/main/java/com/shade/decima/ui/views/ViewManagerImpl.java b/modules/decima-ui/src/main/java/com/shade/decima/ui/views/ViewManagerImpl.java index 1e5923533..c0c462de3 100644 --- a/modules/decima-ui/src/main/java/com/shade/decima/ui/views/ViewManagerImpl.java +++ b/modules/decima-ui/src/main/java/com/shade/decima/ui/views/ViewManagerImpl.java @@ -263,7 +263,7 @@ public ViewPane(@NotNull ViewRegistration registration, @NotNull Component compo )); toolbar.add(UIUtils.createBoldLabel(registration.label())); toolbar.add(Box.createHorizontalGlue()); - toolbar.add(new AbstractAction("Hide", UIManager.getIcon("Toolbar.hideIcon")) { + toolbar.add(new AbstractAction("Hide", UIManager.getIcon("Action.hideIcon")) { @Override public void actionPerformed(ActionEvent e) { hideView(registration.id()); diff --git a/modules/decima-ui/src/main/resources/icons/actions/add_element.svg b/modules/decima-ui/src/main/resources/icons/actions/add_element.svg index 0425143e1..11417908d 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/add_element.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/add_element.svg @@ -1,5 +1,8 @@ - - - + actions-add_element + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/contains.svg b/modules/decima-ui/src/main/resources/icons/actions/contains.svg index 174137790..2827ecaa6 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/contains.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/contains.svg @@ -1,4 +1,7 @@ - - + actions-contains + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/duplicate_element.svg b/modules/decima-ui/src/main/resources/icons/actions/duplicate_element.svg index e1e9126f5..92d00ed41 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/duplicate_element.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/duplicate_element.svg @@ -1,5 +1,8 @@ - - - + actions-duplicate_element + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/edit.svg b/modules/decima-ui/src/main/resources/icons/actions/edit.svg index 986a645ee..c54b67b17 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/edit.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/edit.svg @@ -1,4 +1,7 @@ - - + actions-edit + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/edit_modal.svg b/modules/decima-ui/src/main/resources/icons/actions/edit_modal.svg index 1e831dba8..0fed0e86f 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/edit_modal.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/edit_modal.svg @@ -1,6 +1,12 @@ - - - - + actions-edit_modal + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/export.svg b/modules/decima-ui/src/main/resources/icons/actions/export.svg index 7a576ed29..71b544a0a 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/export.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/export.svg @@ -1,4 +1,10 @@ - - + actions-export + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/toolbars/hide.svg b/modules/decima-ui/src/main/resources/icons/actions/hide.svg similarity index 50% rename from modules/decima-ui/src/main/resources/icons/toolbars/hide.svg rename to modules/decima-ui/src/main/resources/icons/actions/hide.svg index 52e9de8ce..4ee18beef 100644 --- a/modules/decima-ui/src/main/resources/icons/toolbars/hide.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/hide.svg @@ -1,3 +1,4 @@ - + actions-hide + diff --git a/modules/decima-ui/src/main/resources/icons/actions/import.svg b/modules/decima-ui/src/main/resources/icons/actions/import.svg index caf4ef2f8..c427c950f 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/import.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/import.svg @@ -1,4 +1,10 @@ - - + actions-import + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/monitorActive.svg b/modules/decima-ui/src/main/resources/icons/actions/monitorActive.svg deleted file mode 100644 index 83d991f4e..000000000 --- a/modules/decima-ui/src/main/resources/icons/actions/monitorActive.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/decima-ui/src/main/resources/icons/actions/monitorInactive.svg b/modules/decima-ui/src/main/resources/icons/actions/monitorInactive.svg deleted file mode 100644 index 0327e0a16..000000000 --- a/modules/decima-ui/src/main/resources/icons/actions/monitorInactive.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/modules/decima-ui/src/main/resources/icons/actions/navigate.svg b/modules/decima-ui/src/main/resources/icons/actions/navigate.svg index cf5c909a9..1b056ae80 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/navigate.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/navigate.svg @@ -1,4 +1,7 @@ - - + actions-navigate + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/next.svg b/modules/decima-ui/src/main/resources/icons/actions/next.svg new file mode 100644 index 000000000..e0dc3d02e --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/actions/next.svg @@ -0,0 +1,7 @@ + + actions-next + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/normals.svg b/modules/decima-ui/src/main/resources/icons/actions/normals.svg index 78e716a1c..fd818245e 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/normals.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/normals.svg @@ -1,5 +1,7 @@ - - - + actions-normals + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/null_terminator.svg b/modules/decima-ui/src/main/resources/icons/actions/null_terminator.svg index 6e161a23f..76f3589ee 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/null_terminator.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/null_terminator.svg @@ -1,4 +1,7 @@ - - + actions-null_terminator + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/outline.svg b/modules/decima-ui/src/main/resources/icons/actions/outline.svg index 9771f7161..d7c74e0d5 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/outline.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/outline.svg @@ -1,5 +1,11 @@ - - - + actions-outline + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/pack.svg b/modules/decima-ui/src/main/resources/icons/actions/pack.svg index 298382835..6377b7437 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/pack.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/pack.svg @@ -1,4 +1,8 @@ - - + actions-pack + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/pause.svg b/modules/decima-ui/src/main/resources/icons/actions/pause.svg new file mode 100644 index 000000000..99d96345c --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/actions/pause.svg @@ -0,0 +1,7 @@ + + actions-pause + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/play.svg b/modules/decima-ui/src/main/resources/icons/actions/play.svg new file mode 100644 index 000000000..7be8dc12a --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/actions/play.svg @@ -0,0 +1,4 @@ + + actions-play + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/previous.svg b/modules/decima-ui/src/main/resources/icons/actions/previous.svg new file mode 100644 index 000000000..5872fd51e --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/actions/previous.svg @@ -0,0 +1,7 @@ + + actions-previous + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/redo.svg b/modules/decima-ui/src/main/resources/icons/actions/redo.svg index b0e7f7ad8..b6d3c492d 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/redo.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/redo.svg @@ -1,3 +1,7 @@ - + actions-redo + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/remove_element.svg b/modules/decima-ui/src/main/resources/icons/actions/remove_element.svg index 239fec9cc..d471a8171 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/remove_element.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/remove_element.svg @@ -1,5 +1,8 @@ - - - + actions-remove_element + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/save.svg b/modules/decima-ui/src/main/resources/icons/actions/save.svg index 06a4abbda..80bdb7609 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/save.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/save.svg @@ -1,5 +1,8 @@ - - - + actions-save + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/search.svg b/modules/decima-ui/src/main/resources/icons/actions/search.svg index 74825eda3..128a92a23 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/search.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/search.svg @@ -1,3 +1,7 @@ - + actions-search + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/shading.svg b/modules/decima-ui/src/main/resources/icons/actions/shading.svg index f676b2c81..3e9e4a0f0 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/shading.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/shading.svg @@ -1,6 +1,8 @@ - - - - + actions-shading + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/split_down.svg b/modules/decima-ui/src/main/resources/icons/actions/split_down.svg index 9a40cff03..df019df94 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/split_down.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/split_down.svg @@ -1,3 +1,8 @@ - + actions-split_down + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/split_right.svg b/modules/decima-ui/src/main/resources/icons/actions/split_right.svg index 6cb195d20..e0db080aa 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/split_right.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/split_right.svg @@ -1,3 +1,8 @@ - + actions-split_right + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/star.svg b/modules/decima-ui/src/main/resources/icons/actions/star.svg index 00a420d45..d055bb5e5 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/star.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/star.svg @@ -1,3 +1,4 @@ - + actions-star + diff --git a/modules/decima-ui/src/main/resources/icons/actions/tab_close.svg b/modules/decima-ui/src/main/resources/icons/actions/tab_close.svg index b412b125e..ce6d38460 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/tab_close.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/tab_close.svg @@ -1,4 +1,14 @@ - - + actions-tab_close + + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/tab_close_all.svg b/modules/decima-ui/src/main/resources/icons/actions/tab_close_all.svg index b5035448f..638b94d49 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/tab_close_all.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/tab_close_all.svg @@ -1,5 +1,16 @@ - - - + actions-tab_close_all + + + + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/tab_close_others.svg b/modules/decima-ui/src/main/resources/icons/actions/tab_close_others.svg index b2cb1ee88..e7df6a0c2 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/tab_close_others.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/tab_close_others.svg @@ -1,6 +1,16 @@ - - - - + actions-tab_close_others + + + + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/tab_close_uninitialized.svg b/modules/decima-ui/src/main/resources/icons/actions/tab_close_uninitialized.svg index a128654ec..f6bd8642e 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/tab_close_uninitialized.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/tab_close_uninitialized.svg @@ -1,6 +1,16 @@ - - - - + actions-tab_close_uninitialized + + + + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/undo.svg b/modules/decima-ui/src/main/resources/icons/actions/undo.svg index 88fd6d974..9b65486dd 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/undo.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/undo.svg @@ -1,3 +1,7 @@ - + actions-undo + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/wireframe.svg b/modules/decima-ui/src/main/resources/icons/actions/wireframe.svg index 5edbb328d..017f387f9 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/wireframe.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/wireframe.svg @@ -1,5 +1,7 @@ - - - + actions-wireframe + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/zoom_fit.svg b/modules/decima-ui/src/main/resources/icons/actions/zoom_fit.svg index 8fe86b708..1e8cf4af7 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/zoom_fit.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/zoom_fit.svg @@ -1,5 +1,8 @@ - - - + actions-zoom_fit + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/zoom_in.svg b/modules/decima-ui/src/main/resources/icons/actions/zoom_in.svg index 6d5761589..2870ce60d 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/zoom_in.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/zoom_in.svg @@ -1,4 +1,7 @@ - - + actions-zoom_in + + + + diff --git a/modules/decima-ui/src/main/resources/icons/actions/zoom_out.svg b/modules/decima-ui/src/main/resources/icons/actions/zoom_out.svg index 51be42ee4..2d90bf40d 100644 --- a/modules/decima-ui/src/main/resources/icons/actions/zoom_out.svg +++ b/modules/decima-ui/src/main/resources/icons/actions/zoom_out.svg @@ -1,4 +1,7 @@ - - + actions-zoom_out + + + + diff --git a/modules/decima-ui/src/main/resources/icons/application.svg b/modules/decima-ui/src/main/resources/icons/application.svg index b475feedc..477b3fb81 100644 --- a/modules/decima-ui/src/main/resources/icons/application.svg +++ b/modules/decima-ui/src/main/resources/icons/application.svg @@ -1,10 +1,13 @@ - - - - - - - - + application + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/editors/binary.svg b/modules/decima-ui/src/main/resources/icons/editors/binary.svg deleted file mode 100644 index ac00ed265..000000000 --- a/modules/decima-ui/src/main/resources/icons/editors/binary.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/decima-ui/src/main/resources/icons/editors/core.svg b/modules/decima-ui/src/main/resources/icons/editors/core.svg deleted file mode 100644 index ada92f1bb..000000000 --- a/modules/decima-ui/src/main/resources/icons/editors/core.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/modules/decima-ui/src/main/resources/icons/files/binary.svg b/modules/decima-ui/src/main/resources/icons/files/binary.svg new file mode 100644 index 000000000..db8df085c --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/files/binary.svg @@ -0,0 +1,12 @@ + + files-binary + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/files/core.svg b/modules/decima-ui/src/main/resources/icons/files/core.svg new file mode 100644 index 000000000..7bbe50950 --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/files/core.svg @@ -0,0 +1,9 @@ + + files-core + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/guidelines.md b/modules/decima-ui/src/main/resources/icons/guidelines.md new file mode 100644 index 000000000..af6f51eda --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/guidelines.md @@ -0,0 +1,9 @@ +The following colors should be used when designing a new icon. They will be automatically replaced with the correct +theme colors when the icon is rendered. + +| Name | Color | +|--------------------|-----------| +| Dark Base Color | `#6C707E` | +| Light Base Color | `#EBECF0` | +| Dark Accent Color | `#3574F0` | +| Light Accent Color | `#E7EFFD` | \ No newline at end of file diff --git a/modules/decima-ui/src/main/resources/icons/nodes/archive.svg b/modules/decima-ui/src/main/resources/icons/nodes/archive.svg index 31fd3b3a5..540001bb5 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/archive.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/archive.svg @@ -1,4 +1,7 @@ - - + nodes-archive + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/array.svg b/modules/decima-ui/src/main/resources/icons/nodes/array.svg index 0366c3329..d3ed84e1f 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/array.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/array.svg @@ -1,7 +1,10 @@ - - - - - + nodes-array + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/boolean.svg b/modules/decima-ui/src/main/resources/icons/nodes/boolean.svg index c03b4dc01..5acec74ee 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/boolean.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/boolean.svg @@ -1,4 +1,7 @@ - - + nodes-boolean + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/decimal.svg b/modules/decima-ui/src/main/resources/icons/nodes/decimal.svg index 3686306eb..8b3d73843 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/decimal.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/decimal.svg @@ -1,5 +1,8 @@ - - - + nodes-decimal + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/enum.svg b/modules/decima-ui/src/main/resources/icons/nodes/enum.svg index b5b0e9d90..8ffffeaad 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/enum.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/enum.svg @@ -1,8 +1,11 @@ - - - - - - + nodes-enum + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/file.svg b/modules/decima-ui/src/main/resources/icons/nodes/file.svg new file mode 100644 index 000000000..42932171f --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/file.svg @@ -0,0 +1,7 @@ + + nodes-file + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/folder.svg b/modules/decima-ui/src/main/resources/icons/nodes/folder.svg new file mode 100644 index 000000000..cb2051b5b --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/folder.svg @@ -0,0 +1,4 @@ + + nodes-folder + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/integer.svg b/modules/decima-ui/src/main/resources/icons/nodes/integer.svg index efefff3db..3d84e7e6b 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/integer.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/integer.svg @@ -1,5 +1,8 @@ - - - + nodes-integer + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/model.svg b/modules/decima-ui/src/main/resources/icons/nodes/model.svg new file mode 100644 index 000000000..58c45d6da --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/model.svg @@ -0,0 +1,10 @@ + + nodes-model + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/monitorActive.svg b/modules/decima-ui/src/main/resources/icons/nodes/monitorActive.svg new file mode 100644 index 000000000..9df20acfe --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/monitorActive.svg @@ -0,0 +1,7 @@ + + nodes-monitorActive + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/monitorInactive.svg b/modules/decima-ui/src/main/resources/icons/nodes/monitorInactive.svg new file mode 100644 index 000000000..699f80e45 --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/monitorInactive.svg @@ -0,0 +1,4 @@ + + nodes-monitorInactive + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/object.svg b/modules/decima-ui/src/main/resources/icons/nodes/object.svg index 15d1c0f4d..3bf05e24f 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/object.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/object.svg @@ -1,5 +1,9 @@ - - - + nodes-object + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/reference.svg b/modules/decima-ui/src/main/resources/icons/nodes/reference.svg index 77a4ae5c1..39683645d 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/reference.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/reference.svg @@ -1,8 +1,13 @@ - - - - - - + nodes-reference + + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/string.svg b/modules/decima-ui/src/main/resources/icons/nodes/string.svg index d3bd52444..c419d15f6 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/string.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/string.svg @@ -1,5 +1,8 @@ - - - + nodes-string + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/texture.svg b/modules/decima-ui/src/main/resources/icons/nodes/texture.svg new file mode 100644 index 000000000..521da0367 --- /dev/null +++ b/modules/decima-ui/src/main/resources/icons/nodes/texture.svg @@ -0,0 +1,8 @@ + + nodes-texture + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/nodes/uuid.svg b/modules/decima-ui/src/main/resources/icons/nodes/uuid.svg index 0acc3aad8..dd42728f6 100644 --- a/modules/decima-ui/src/main/resources/icons/nodes/uuid.svg +++ b/modules/decima-ui/src/main/resources/icons/nodes/uuid.svg @@ -1,9 +1,12 @@ - - - - - - - + nodes-uuid + + + + + + + + + diff --git a/modules/decima-ui/src/main/resources/icons/overlays/add.svg b/modules/decima-ui/src/main/resources/icons/overlays/add.svg index 6258e9e89..37de67761 100644 --- a/modules/decima-ui/src/main/resources/icons/overlays/add.svg +++ b/modules/decima-ui/src/main/resources/icons/overlays/add.svg @@ -1,3 +1,4 @@ - + overlays-add + diff --git a/modules/decima-ui/src/main/resources/icons/overlays/modify.svg b/modules/decima-ui/src/main/resources/icons/overlays/modify.svg index bfcdf8547..f5ef9ff9a 100644 --- a/modules/decima-ui/src/main/resources/icons/overlays/modify.svg +++ b/modules/decima-ui/src/main/resources/icons/overlays/modify.svg @@ -1,3 +1,4 @@ - + overlays-modify + diff --git a/modules/decima-ui/src/main/resources/icons/toolbars/next.svg b/modules/decima-ui/src/main/resources/icons/toolbars/next.svg deleted file mode 100644 index 6100d3214..000000000 --- a/modules/decima-ui/src/main/resources/icons/toolbars/next.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/decima-ui/src/main/resources/icons/toolbars/pause.svg b/modules/decima-ui/src/main/resources/icons/toolbars/pause.svg deleted file mode 100644 index cc30ed565..000000000 --- a/modules/decima-ui/src/main/resources/icons/toolbars/pause.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/decima-ui/src/main/resources/icons/toolbars/play.svg b/modules/decima-ui/src/main/resources/icons/toolbars/play.svg deleted file mode 100644 index 315267299..000000000 --- a/modules/decima-ui/src/main/resources/icons/toolbars/play.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/modules/decima-ui/src/main/resources/icons/toolbars/previous.svg b/modules/decima-ui/src/main/resources/icons/toolbars/previous.svg deleted file mode 100644 index 95811eeb0..000000000 --- a/modules/decima-ui/src/main/resources/icons/toolbars/previous.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/platform-ui/build.gradle b/modules/platform-ui/build.gradle index 03e8267f2..241c6781b 100644 --- a/modules/platform-ui/build.gradle +++ b/modules/platform-ui/build.gradle @@ -9,6 +9,6 @@ dependencies { api group: 'com.miglayout', name: 'miglayout-swing', version: '11.0' // https://mvnrepository.com/artifact/com.formdev - api group: 'com.formdev', name: 'flatlaf', version: '2.6' - api group: 'com.formdev', name: 'flatlaf-extras', version: '2.6' + api group: 'com.formdev', name: 'flatlaf', version: '3.4' + api group: 'com.formdev', name: 'flatlaf-extras', version: '3.4' } \ No newline at end of file diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredListCellRenderer.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredListCellRenderer.java index abadf26b3..cf3d38a2c 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredListCellRenderer.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredListCellRenderer.java @@ -1,7 +1,5 @@ package com.shade.platform.ui.controls; -import com.formdev.flatlaf.extras.FlatSVGIcon; -import com.shade.platform.ui.util.UIUtils; import com.shade.util.NotNull; import com.shade.util.Nullable; @@ -36,19 +34,6 @@ public Component getListCellRendererComponent(JList list, T value, customizeCellRenderer(list, value, index, selected, focused); - final Icon leadingIcon = getLeadingIcon(); - final Icon trailingIcon = getTrailingIcon(); - - if ((leadingIcon != null || trailingIcon != null) && selected) { - final FlatSVGIcon.ColorFilter selectionFilter = UIUtils.createSelectionColorFilter(list.getSelectionBackground()); - if (leadingIcon != null) { - setLeadingIcon(UIUtils.applyColorFilter(leadingIcon, selectionFilter)); - } - if (trailingIcon != null) { - setTrailingIcon(UIUtils.applyColorFilter(trailingIcon, selectionFilter)); - } - } - final String title = getTitle(list, value, index); if (title != null) { diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredTreeCellRenderer.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredTreeCellRenderer.java index 5a1579449..88b6fb890 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredTreeCellRenderer.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/controls/ColoredTreeCellRenderer.java @@ -1,10 +1,8 @@ package com.shade.platform.ui.controls; -import com.formdev.flatlaf.extras.FlatSVGIcon; import com.formdev.flatlaf.ui.FlatUIUtils; import com.shade.platform.ui.controls.tree.TreeModel; import com.shade.platform.ui.controls.tree.TreeNode; -import com.shade.platform.ui.util.UIUtils; import com.shade.util.NotNull; import com.shade.util.Nullable; @@ -21,7 +19,6 @@ public abstract class ColoredTreeCellRenderer extends ColoredComponent implem private Color foregroundNonSelectionColor; private Color backgroundSelectionColor; private Color backgroundNonSelectionColor; - private FlatSVGIcon.ColorFilter selectionFilter; public ColoredTreeCellRenderer() { updateUI(); @@ -36,7 +33,6 @@ public void updateUI() { this.foregroundNonSelectionColor = UIManager.getColor("Tree.textForeground"); this.backgroundSelectionColor = UIManager.getColor("Tree.selectionBackground"); this.backgroundNonSelectionColor = UIManager.getColor("Tree.textBackground"); - this.selectionFilter = UIUtils.createSelectionColorFilter(backgroundSelectionColor); } @SuppressWarnings("unchecked") @@ -53,10 +49,6 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean icon = Objects.requireNonNullElse(UIManager.getLookAndFeel().getDisabledIcon(tree, icon), icon); } - if (icon != null && selected && isFocused()) { - icon = UIUtils.applyColorFilter(icon, selectionFilter); - } - setBackground(selected ? backgroundSelectionColor : backgroundNonSelectionColor); setForeground(selected ? foregroundSelectionColor : foregroundNonSelectionColor); setLeadingIcon(icon); diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/icons/OverlaidIcon.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/icons/OverlaidIcon.java index 8b2f18565..d28b8a655 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/icons/OverlaidIcon.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/icons/OverlaidIcon.java @@ -1,10 +1,7 @@ package com.shade.platform.ui.icons; -import com.formdev.flatlaf.extras.FlatSVGIcon; import com.formdev.flatlaf.icons.FlatAbstractIcon; -import com.shade.platform.ui.util.UIUtils; import com.shade.util.NotNull; -import com.shade.util.Nullable; import javax.swing.*; import java.awt.*; @@ -12,7 +9,6 @@ public class OverlaidIcon extends FlatAbstractIcon { private final Icon baseIcon; private final Icon overlayIcon; - private FlatSVGIcon.ColorFilter colorFilter; public OverlaidIcon(@NotNull Icon baseIcon, @NotNull Icon overlayIcon) { super(16, 16, null); @@ -20,22 +16,10 @@ public OverlaidIcon(@NotNull Icon baseIcon, @NotNull Icon overlayIcon) { this.overlayIcon = overlayIcon; } - public OverlaidIcon(@NotNull OverlaidIcon icon) { - this(icon.baseIcon, icon.overlayIcon); - this.colorFilter = null; - } - @Override protected void paintIcon(Component c, Graphics2D g) { - final Icon overlayIcon = UIUtils.applyColorFilter(this.overlayIcon, colorFilter); - final Icon baseIcon = UIUtils.applyColorFilter(this.baseIcon, colorFilter); - baseIcon.paintIcon(c, g, 0, 0); g.fillOval(7, 7, 10, 10); overlayIcon.paintIcon(c, g, 8, 8); } - - public void setColorFilter(@Nullable FlatSVGIcon.ColorFilter colorFilter) { - this.colorFilter = colorFilter; - } } diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/util/UIUtils.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/util/UIUtils.java index 1949b7cb2..add1105b6 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/util/UIUtils.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/util/UIUtils.java @@ -1,12 +1,9 @@ package com.shade.platform.ui.util; import com.formdev.flatlaf.FlatClientProperties; -import com.formdev.flatlaf.extras.FlatSVGIcon; -import com.formdev.flatlaf.util.HSLColor; import com.shade.platform.ui.controls.validation.InputValidator; import com.shade.platform.ui.controls.validation.Validation; import com.shade.platform.ui.dialogs.ExceptionDialog; -import com.shade.platform.ui.icons.OverlaidIcon; import com.shade.util.NotNull; import com.shade.util.Nullable; @@ -408,38 +405,6 @@ public void updateUI() { }; } - @NotNull - public static FlatSVGIcon.ColorFilter createSelectionColorFilter(@NotNull Color background) { - return new FlatSVGIcon.ColorFilter(foreground -> { - final float[] bg = HSLColor.fromRGB(background); - final float[] fg = HSLColor.fromRGB(foreground); - - if (Math.abs(bg[0] - fg[0]) < 15.0f) { - return HSLColor.toRGB(fg[0], fg[1], Math.min(fg[2] * 1.50f, 100.0f)); - } else { - return HSLColor.toRGB(fg[0], fg[1], Math.min(fg[2] * 1.15f, 100.0f)); - } - }); - } - - @NotNull - public static Icon applyColorFilter(@NotNull Icon icon, @Nullable FlatSVGIcon.ColorFilter filter) { - if (filter == null) { - return icon; - } - if (icon instanceof FlatSVGIcon i) { - final FlatSVGIcon filtered = new FlatSVGIcon(i); - filtered.setColorFilter(filter); - return filtered; - } else if (icon instanceof OverlaidIcon i) { - final OverlaidIcon filtered = new OverlaidIcon(i); - filtered.setColorFilter(filter); - return filtered; - } else { - return icon; - } - } - public static void minimizePanel(@NotNull JSplitPane pane, boolean topOrLeft) { try { final Field field = BasicSplitPaneUI.class.getDeclaredField("keepHidden"); diff --git a/modules/platform-ui/src/main/resources/themes/FlatDarkLaf.properties b/modules/platform-ui/src/main/resources/themes/FlatDarkLaf.properties index 69427c7e3..ff21012d7 100644 --- a/modules/platform-ui/src/main/resources/themes/FlatDarkLaf.properties +++ b/modules/platform-ui/src/main/resources/themes/FlatDarkLaf.properties @@ -1,3 +1,5 @@ +@accentSelectionBackground = darken(desaturate(@accentBaseColor, 60%), 20%) + # Validation Component.error.background = darken($Component.error.borderColor, 10%) Component.warning.background = darken($Component.warning.borderColor, 10%) @@ -30,9 +32,9 @@ MemoryIndicator.usedBackground = mix($Component.accentColor,$MemoryIndicator.max # Hex Editor HexEditor.background = @background HexEditor.oddBackground = darken(HexEditor.background,5%,lazy) -HexEditor.hotBackground = darken(HexEditor.selectionBackground,25%,lazy) - +HexEditor.hotBackground = darken(HexEditor.selectionBackground,15%,lazy) HexEditor.dividerForeground = lighten(HexEditor.background,10%,lazy) +HexEditor.dividerSelectionForeground = lighten(HexEditor.selectionBackground,10%,lazy) # Graph Graph.nodeSelectionBackground = mix($Component.focusColor, $Graph.nodeBackground, 25%) diff --git a/modules/platform-ui/src/main/resources/themes/FlatLaf.properties b/modules/platform-ui/src/main/resources/themes/FlatLaf.properties index f37aaec41..5125f4ec4 100644 --- a/modules/platform-ui/src/main/resources/themes/FlatLaf.properties +++ b/modules/platform-ui/src/main/resources/themes/FlatLaf.properties @@ -1,5 +1,15 @@ FlatLaf.experimental.tree.widePathForLocation = true +@accentBaseColor = #4a87f0 +@accentSelectionBackground = lighten(@accentBaseColor, 30%) +@selectionInactiveBackground = shade(@background,5%) + +# Icons +Icon.baseColor = desaturate(@accentBaseColor, 70%) +Icon.baseColor2 = fade($Icon.baseColor, 10%) +Icon.accentColor = fade(@accentBaseColor, 80%) +Icon.accentColor2 = fade($Icon.accentColor, 20%) + # UI Delegates RangeSliderUI = com.shade.platform.ui.controls.plaf.FlatRangeSliderUI TreeUI = com.shade.platform.ui.controls.tree.TreeUI @@ -14,8 +24,6 @@ TitlePane.unifiedBackground = false TitlePane.buttonSize = 44,28 TabbedPane.tabHeight = 24 Component.hideMnemonics = false -Tree.paintLines = true -Tree.lineTypeDashed = true Tree.showsRootHandles = true SplitPane.dividerSize = 7 SplitPaneDivider.border = com.shade.decima.ui.controls.SplitPaneDividerBorder @@ -60,17 +68,14 @@ MemoryIndicator.usedBackground = mix($Component.accentColor,$MemoryIndicator.max # Hex Editor HexEditor.background = #fff -HexEditor.oddBackground = darken(HexEditor.background,6%,lazy) -HexEditor.hotBackground = mix($HexEditor.selectionBackground,$HexEditor.background,25%) +HexEditor.oddBackground = darken(HexEditor.background, 6%, lazy) +HexEditor.hotBackground = lighten(HexEditor.selectionBackground, 5%, lazy) HexEditor.selectionBackground = @selectionBackground HexEditor.selectionInactiveBackground = @selectionInactiveBackground - HexEditor.foreground = @foreground HexEditor.selectionForeground = @selectionForeground - HexEditor.dividerForeground = darken(HexEditor.background,25%,lazy) -HexEditor.dividerSelectionForeground = lighten(HexEditor.selectionBackground,10%,lazy) - +HexEditor.dividerSelectionForeground = darken(HexEditor.selectionBackground,10%,lazy) HexEditor.caretForeground = @foreground HexEditor.caretInactiveBackground = $HexEditor.dividerForeground