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
28 changes: 16 additions & 12 deletions owlplug-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<properties>
<springboot.version>4.0.1</springboot.version>
<mockito.version>5.20.0</mockito.version>
<ikonli.version>12.4.0</ikonli.version>
</properties>

<parent>
Expand Down Expand Up @@ -120,18 +121,21 @@
<artifactId>controlsfx</artifactId>
<version>11.1.2</version>
</dependency>
<dependency>
<groupId>org.jfxtras</groupId>
<artifactId>jmetro</artifactId>
<version>11.6.16</version>
<exclusions>
<exclusion>
<!-- Exclude embedded javafx -->
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-base</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<version>${ikonli.version}</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-materialdesign2-pack</artifactId>
<version>${ikonli.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.plist</groupId>
<artifactId>dd-plist</artifactId>
Expand Down
15 changes: 9 additions & 6 deletions owlplug-client/src/main/java/com/owlplug/OwlPlug.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.owlplug;

import atlantafx.base.theme.PrimerDark;
import com.owlplug.controls.OwlPlugControlsResources;
import com.owlplug.core.components.ApplicationDefaults;
import com.owlplug.core.controllers.MainController;
Expand All @@ -30,8 +31,6 @@
import javafx.scene.Scene;
import javafx.stage.Stage;
import javax.sql.DataSource;
import jfxtras.styles.jmetro.JMetro;
import jfxtras.styles.jmetro.Style;
import org.ehcache.CacheManager;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.CacheManagerBuilder;
Expand Down Expand Up @@ -121,13 +120,17 @@ public void start(Stage primaryStage) throws Exception {
double width = 1050;
double height = 800;

Application.setUserAgentStylesheet(new PrimerDark().getUserAgentStylesheet());


Scene scene = new Scene(rootNode, width, height);
JMetro metroTheme = new JMetro(Style.DARK);
metroTheme.setScene(scene);

String owlplugControlsCss = OwlPlugControlsResources.load("/css/owlplug-controls.css").toExternalForm();
metroTheme.getOverridingStylesheets().add(owlplugControlsCss);
String owlplugCss = OwlPlug.class.getResource("/owlplug.css").toExternalForm();
metroTheme.getOverridingStylesheets().add(owlplugCss);

scene.getStylesheets().add(owlplugCss);
scene.getStylesheets().add(owlplugControlsCss);

primaryStage.getIcons().add(ApplicationDefaults.owlplugLogo);
primaryStage.setTitle(ApplicationDefaults.APPLICATION_NAME);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

package com.owlplug;

import atlantafx.base.theme.PrimerDark;
import com.owlplug.core.components.ApplicationDefaults;
import javafx.application.Application;
import javafx.application.Preloader;
import javafx.application.Preloader.StateChangeNotification.Type;
import javafx.fxml.FXMLLoader;
Expand All @@ -28,8 +30,6 @@
import javafx.scene.control.Alert.AlertType;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import jfxtras.styles.jmetro.JMetro;
import jfxtras.styles.jmetro.Style;

public class OwlPlugPreloader extends Preloader {

Expand All @@ -42,9 +42,9 @@ public void start(Stage primaryStage) throws Exception {
FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/Preloader.fxml"));
Parent root = loader.load();

Application.setUserAgentStylesheet(new PrimerDark().getUserAgentStylesheet());

Scene scene = new Scene(root);
JMetro jMetro = new JMetro(Style.DARK);
jMetro.setScene(scene);
String owlplugCss = OwlPlugPreloader.class.getResource("/owlplug.css").toExternalForm();
scene.getStylesheets().add(owlplugCss);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
import com.owlplug.core.utils.PlatformUtils;
import com.owlplug.explore.components.ExploreTaskFactory;
import com.owlplug.explore.controllers.ExploreController;
import com.owlplug.explore.services.ExploreService;
import com.owlplug.plugin.services.PluginService;
import com.owlplug.core.services.AppUpdateService;
import atlantafx.base.theme.Styles;
import jakarta.annotation.PreDestroy;
import java.util.ArrayList;
import java.util.Optional;
Expand All @@ -56,7 +56,6 @@
import javafx.scene.control.TabPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import jfxtras.styles.jmetro.JMetroStyleClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -122,7 +121,7 @@ public void initialize() {
viewRegistry.preload();
this.getDialogManager().setDialogContainer(this.getRootPane());

this.tabPaneHeader.getStyleClass().add(JMetroStyleClass.UNDERLINE_TAB_PANE);
tabPaneHeader.getStyleClass().add(Styles.TABS_BORDER_TOP);
this.tabPaneHeader.getSelectionModel().selectedIndexProperty().addListener((options, oldValue, newValue) -> {
tabPaneContent.getSelectionModel().select(newValue.intValue());
leftDrawer.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.owlplug.core.controllers.fragments;

import atlantafx.base.controls.ToggleSwitch;
import com.owlplug.core.components.ApplicationPreferences;
import com.owlplug.core.ui.SVGPaths;
import com.owlplug.core.utils.FileUtils;
Expand All @@ -37,7 +38,6 @@
import javafx.scene.shape.SVGPath;
import javafx.stage.DirectoryChooser;
import javafx.stage.Window;
import org.controlsfx.control.ToggleSwitch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.owlplug.explore.controllers;

import atlantafx.base.controls.ToggleSwitch;
import com.owlplug.core.controllers.BaseController;
import com.owlplug.core.controllers.MainController;
import com.owlplug.core.utils.FX;
Expand All @@ -34,7 +35,6 @@
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import org.controlsfx.control.ToggleSwitch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.event.EventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

package com.owlplug.plugin.controllers;

import atlantafx.base.controls.ToggleSwitch;
import com.owlplug.controls.Dialog;
import com.owlplug.controls.DialogLayout;
import com.owlplug.core.components.ApplicationDefaults;
Expand Down Expand Up @@ -56,7 +57,6 @@
import javafx.scene.layout.BackgroundRepeat;
import javafx.scene.layout.BackgroundSize;
import javafx.scene.layout.Pane;
import org.controlsfx.control.ToggleSwitch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.event.EventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@
import com.owlplug.plugin.events.PluginRefreshEvent;
import com.owlplug.plugin.events.PluginScanEvent;
import com.owlplug.plugin.events.PluginUpdateEvent;
import com.owlplug.plugin.model.Plugin;
import com.owlplug.plugin.repositories.PluginRepository;
import com.owlplug.plugin.services.PluginService;
import com.owlplug.core.utils.Async;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.MenuItem;
import javafx.scene.control.SplitMenuButton;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import jfxtras.styles.jmetro.JMetroStyleClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Controller;
Expand All @@ -64,7 +63,9 @@ public class PluginsController extends BaseController {
protected PluginTableController tableController;

@FXML
private Button scanButton;
private SplitMenuButton scanMenuButton;
@FXML
private MenuItem scanMenuItem;
@FXML
private MenuItem fullScanMenuItem;
@FXML
Expand Down Expand Up @@ -146,8 +147,6 @@ public void initialize() {
* ===================
*/

displaySwitchTabPane.getStyleClass().add(JMetroStyleClass.UNDERLINE_TAB_PANE);

// Set default display (flat plugin tree)
treeViewController.setDisplayMode(PluginTreeViewController.Display.FlatTree);
treeViewController.getTreeView().setVisible(true);
Expand Down Expand Up @@ -186,7 +185,12 @@ public void initialize() {
displaySwitchTabPane.getSelectionModel().select(displayListTab);
}

scanButton.setOnAction(e -> {
scanMenuButton.setOnAction(e -> {
this.getTelemetryService().event("/Plugins/Scan");
pluginService.scanPlugins();
});

scanMenuItem.setOnAction(e -> {
this.getTelemetryService().event("/Plugins/Scan");
pluginService.scanPlugins();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
*/

package com.owlplug.plugin.ui;


import atlantafx.base.controls.ToggleSwitch;
import com.owlplug.core.components.ApplicationDefaults;
import com.owlplug.plugin.model.Plugin;
import com.owlplug.plugin.services.PluginService;
Expand All @@ -28,7 +29,6 @@
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import org.controlsfx.control.ToggleSwitch;

public class RecoveredPluginView extends HBox {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.util.Callback;
import jfxtras.styles.jmetro.JMetroStyleClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Controller;
Expand Down Expand Up @@ -71,8 +70,6 @@ public void initialize() {
projectService.syncProjects();
});

projectTreeViewTabPane.getStyleClass().add(JMetroStyleClass.UNDERLINE_TAB_PANE);

projectTreeView.setCellFactory((Callback<TreeView<Object>, TreeCell<Object>>)
p -> new ProjectTreeCell(getApplicationDefaults()));

Expand Down
28 changes: 23 additions & 5 deletions owlplug-client/src/main/resources/fxml/MainView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<?import java.lang.String?>
<?import com.owlplug.controls.Drawer?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<StackPane fx:id="rootPane" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.core.controllers.MainController">
<VBox AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
Expand All @@ -24,13 +25,30 @@
<styleClass>
<String fx:value="header"/>
</styleClass>
<TabPane fx:id="tabPaneHeader" prefHeight="45.0" prefWidth="450.0" style="-fx-tab-min-height: 45;"
<TabPane fx:id="tabPaneHeader" prefHeight="45.0" prefWidth="450.0"
style="-fx-tab-min-height: 36;"
HBox.hgrow="ALWAYS" VBox.vgrow="NEVER">
<Tab disable="true" text="OwlPlug" closable="false"/>
<Tab text="Plugins" closable="false"/>
<Tab text="Explore" closable="false"/>
<Tab text="Projects" closable="false"/>
<Tab text="Options" closable="false"/>
<Tab text="Plugins" closable="false">
<graphic>
<FontIcon iconLiteral="mdi2p-power-plug-outline" />
</graphic>
</Tab>
<Tab text="Explore" closable="false">
<graphic>
<FontIcon iconLiteral="mdi2c-compass-outline" />
</graphic>
</Tab>
<Tab text="Projects" closable="false">
<graphic>
<FontIcon iconLiteral="mdi2a-archive-music-outline" />
</graphic>
</Tab>
<Tab text="Options" closable="false">
<graphic>
<FontIcon iconLiteral="mdi2c-cog-outline" />
</graphic>
</Tab>
</TabPane>
<HBox fx:id="updatePane" alignment="CENTER_LEFT" prefHeight="45.0" spacing="5.0">
<padding>
Expand Down
2 changes: 1 addition & 1 deletion owlplug-client/src/main/resources/fxml/Preloader.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?>

<Pane maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="300.0" prefWidth="600.0"
style="-fx-background-color: linear-gradient(from 100px 200px to 101px 201px, #dfa579, #464646 100%);"
style="-fx-background-color: linear-gradient(from 100px 200px to 101px 201px, #dfa579, -color-bg-subtle 100%);"
styleClass="preloader" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.core.controllers.PreloaderController">
<HBox fx:id="contributorsPane" layoutX="360.0" layoutY="130.0" prefHeight="30.0" prefWidth="212.0" spacing="5">
Expand Down
18 changes: 7 additions & 11 deletions owlplug-client/src/main/resources/fxml/TaskBarView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>

<?import org.kordamp.ikonli.javafx.FontIcon?>
<HBox xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.core.controllers.TaskBarController">
<styleClass>
<String fx:value="task-bar-footer"/>
</styleClass>

<HBox alignment="CENTER_LEFT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
minWidth="-Infinity" prefWidth="600.0" spacing="2.0" HBox.hgrow="ALWAYS">
<styleClass>
<String fx:value="pane-card"/>
</styleClass>
<HBox.margin>
<Insets bottom="10.0" left="20.0" right="20.0"/>
<Insets bottom="10.0" left="20.0" right="20.0" top="10"/>
</HBox.margin>
<VBox HBox.hgrow="ALWAYS">
<Label fx:id="taskLabel" text=" All clear"/>
Expand All @@ -24,16 +24,12 @@
</VBox>
<Button fx:id="logsButton" text="View Logs" layoutX="574.0" layoutY="14.0" style="-fx-background-color: transparent;">
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
<Image url="@../icons/gear-white-32.png" />
</ImageView>
<FontIcon iconLiteral="mdi2c-cogs" />
</graphic>
</Button>
<Button fx:id="taskHistoryButton" contentDisplay="GRAPHIC_ONLY" style="-fx-background-color: transparent;">
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
<Image url="@../icons/menudot-white-64.png"/>
</ImageView>
<FontIcon iconLiteral="mdi2d-dots-vertical" />
</graphic>
</Button>
</HBox>
Expand Down
Loading