Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 18 / Updates #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ allprojects {
// This includes either project-specific license or a default one
if (file("$projectDir/LICENSE").exists()) {
textFrom("$projectDir/LICENSE")
rename { s -> "${project.name.toUpperCase()}_LICENSE" }
rename { "${project.name.toUpperCase()}_LICENSE" }
} else {
textFrom("$rootDir/LICENSE")
rename { s -> "${rootProject.name.toUpperCase()}_LICENSE" }
rename { "${rootProject.name.toUpperCase()}_LICENSE" }
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion core/src/main/java/me/nov/threadtear/ThreadtearCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
import java.util.stream.Collectors;

public class ThreadtearCore {

// removed due to being unused
/*
public static void configureEnvironment() throws Exception {
System.setProperty("file.encoding", "UTF-8");
Field charset = Charset.class.getDeclaredField("defaultCharset");
charset.setAccessible(true);
charset.set(null, null);
}

*/
public static void configureLoggers() {
LogWrapper.logger.addLogger(LoggerFactory.getLogger("logfile"));
LogWrapper.logger.addLogger(LoggerFactory.getLogger("form"));
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ com.github.autostyle.version = 3.1
commons-io.version = 2.6
commons-configuration2.version = 2.7
commons-beanutils.version = 1.9.4
darklaf.version = 2.6.1
darklaf.extensions.version = 0.3.4
darklaf.version = 3.0.2
darklaf.extensions.version = 0.4.1
asm.version = 9.1
cfr.version = -SNAPSHOT
rsyntaxtextarea.version = 3.1.1
Expand Down
2 changes: 1 addition & 1 deletion gui/src/main/java/me/nov/threadtear/Threadtear.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static Threadtear getInstance() {
public static void main(String[] args) throws Exception {
LookAndFeel.init();
LookAndFeel.setLookAndFeel();
ThreadtearCore.configureEnvironment();
// ThreadtearCore.configureEnvironment();
ThreadtearCore.configureLoggers();
configureGUILoggers();
getInstance().setVisible(true);
Expand Down
2 changes: 1 addition & 1 deletion gui/src/main/java/me/nov/threadtear/swing/SwingUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.components.border.DarkBorders;
import com.github.weisj.darklaf.icons.IconLoader;
import com.github.weisj.darklaf.properties.icons.IconLoader;
import com.github.weisj.darklaf.ui.button.DarkButtonUI;
import me.nov.threadtear.Threadtear;
import me.nov.threadtear.swing.textarea.DecompilerTextArea;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package me.nov.threadtear.swing.laf;

import java.awt.Color;
import java.util.logging.Level;

import javax.swing.plaf.ColorUIResource;

import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.theme.*;
import com.github.weisj.darklaf.theme.info.ColorToneRule;
import com.github.weisj.darklaf.theme.info.ContrastRule;
import com.github.weisj.darklaf.theme.info.DefaultThemeProvider;
import com.github.weisj.darklaf.theme.info.PreferredThemeStyle;
import com.github.weisj.darklaf.theme.spec.ColorToneRule;
import com.github.weisj.darklaf.theme.spec.ContrastRule;
import com.github.weisj.darklaf.theme.spec.PreferredThemeStyle;

public class LookAndFeel {

Expand All @@ -28,7 +29,7 @@ public static void init() {
}

public static void setLookAndFeel() {
LafManager.enableLogging(true);
LafManager.setLogLevel(Level.INFO);
LafManager.registerDefaultsAdjustmentTask((t, d) -> {
if (Theme.isDark(t)) {
Object p = d.get("backgroundContainer");
Expand Down