Skip to content

Commit

Permalink
Remove old look and feel library
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Apr 28, 2024
1 parent c509e87 commit 1a3cc50
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
11 changes: 0 additions & 11 deletions convex-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@
<version>${flatlaf.version}</version>
</dependency>

<dependency>
<groupId>io.github.vincenzopalazzo</groupId>
<artifactId>material-ui-swing</artifactId>
<version>1.1.4</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
38 changes: 0 additions & 38 deletions convex-gui/src/main/java/convex/gui/utils/Toolkit.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package convex.gui.utils;

import java.awt.Color;
import java.awt.Component;
import java.awt.Desktop;
import java.awt.Font;
Expand Down Expand Up @@ -32,13 +31,10 @@
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.plaf.FontUIResource;
import javax.swing.text.DefaultEditorKit;

import org.slf4j.Logger;
Expand All @@ -51,9 +47,6 @@
import convex.core.data.AccountKey;
import convex.core.util.Utils;
import convex.gui.keys.KeyRingPanel;
import mdlaf.MaterialLookAndFeel;
import mdlaf.themes.AbstractMaterialTheme;
import mdlaf.themes.MaterialOceanicTheme;

@SuppressWarnings("serial")
public class Toolkit {
Expand Down Expand Up @@ -106,37 +99,6 @@ protected static LookAndFeel installFlatLaf() {
return laf;
}

protected static MaterialLookAndFeel installMDLaf() throws ClassNotFoundException, InstantiationException,
IllegalAccessException, UnsupportedLookAndFeelException {
UIManager.installLookAndFeel("Material", "mdlaf.MaterialLookAndFeel");
Class.forName("mdlaf.MaterialLookAndFeel");
// search for Nimbus look and feel if it is available
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
String name = info.getName();
// log.info("Found L&F: " + name);
if (name.equals("Nimbus")) { // Nimbus
UIManager.setLookAndFeel(info.getClassName());
// UIManager.put("nimbusBase", new Color(130,89,171));
// UIManager.put("menu", new Color(61,89,171));
// UIManager.put("control", new Color(200,180,160));
}
}

// prefer MaterialLookAndFeel if we have it
AbstractMaterialTheme theme = new MaterialOceanicTheme();
MaterialLookAndFeel material = new MaterialLookAndFeel(theme);

// DEFAULT_FONT=SMALL_MONO_FONT;
theme.setFontRegular(new FontUIResource(DEFAULT_FONT));
theme.setFontBold(new FontUIResource(DEFAULT_FONT.deriveFont(Font.BOLD)));
theme.setFontItalic(new FontUIResource(DEFAULT_FONT.deriveFont(Font.ITALIC)));
theme.setFontMedium(new FontUIResource(DEFAULT_FONT.deriveFont(Font.PLAIN)));

UIManager.getLookAndFeelDefaults().put("TextField.caretForeground", Color.white);

return material;
}

// public static final ImageIcon LOCKED_ICON =
// scaledIcon(36,"/images/ic_lock_outline_black_36dp.png");
// public static final ImageIcon UNLOCKED_ICON =
Expand Down

0 comments on commit 1a3cc50

Please sign in to comment.