Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sotasan authored Sep 30, 2023
2 parents 47c04f9 + 14089e1 commit 2fab5f0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gradle
.idea
.DS_Store
build
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("application")
id("java")
id("com.github.johnrengelman.shadow") version("8.1.1")
id("io.freefair.lombok") version("8.3")
id("java")
}

group = "com.sotasan"
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/sotasan/decompiler/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.formdev.flatlaf.extras.FlatInspector;
import com.formdev.flatlaf.fonts.inter.FlatInterFont;
import com.formdev.flatlaf.fonts.jetbrains_mono.FlatJetBrainsMonoFont;
import com.formdev.flatlaf.util.SystemInfo;
import com.sotasan.decompiler.controllers.WindowController;
import com.sotasan.decompiler.services.LoaderService;
import lombok.SneakyThrows;
Expand All @@ -26,7 +27,7 @@ public static void main(String @NotNull [] args) {
FlatLaf.setPreferredFontFamily(FlatInterFont.FAMILY);
FlatLaf.registerCustomDefaultsSource("themes");
FlatDarkLaf.setup();
FlatInspector.install("meta shift I");
FlatInspector.install(String.format("%s shift I", SystemInfo.isMacOS ? "meta" : "ctrl"));

WindowController.getINSTANCE().show();
if (args.length > 0)
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/sotasan/decompiler/views/TabsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class TabsView extends FlatTabbedPane {
public TabsView() {
addMouseListener(new TabMouseAdapter());
setHasFullBorder(true);
setMinimumSize(new Dimension(250, 0));
setTabsClosable(true);
setTabCloseCallback(this::onTabClose);
setTabLayoutPolicy(SCROLL_TAB_LAYOUT);
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/com/sotasan/decompiler/views/WindowView.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ public WindowView() {

JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.setMinimumSize(new Dimension(100, 0));
splitPane.setLeftComponent(panel);

if (SystemInfo.isMacFullWindowContentSupported) {
getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);

// TODO: macos maximized window support
Dimension dimension = new Dimension(0, 25);
JPanel macos = new JPanel();
macos.setPreferredSize(new Dimension(0, 25));
macos.setMinimumSize(dimension);
macos.setPreferredSize(dimension);
panel.add(macos);
}

Expand Down
Binary file modified src/test/resources/META-INF/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2fab5f0

Please sign in to comment.