Skip to content

Commit ae1bbad

Browse files
committed
Visual fixes for Linux
1 parent 88f2a82 commit ae1bbad

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

app/src/processing/app/platform/LinuxPlatform.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import processing.app.Preferences;
3232
import processing.core.PApplet;
3333

34+
import javax.swing.*;
35+
3436

3537
public class LinuxPlatform extends DefaultPlatform {
3638
String homeDir;
@@ -39,6 +41,9 @@ public class LinuxPlatform extends DefaultPlatform {
3941
public void initBase(Base base) {
4042
super.initBase(base);
4143

44+
JFrame.setDefaultLookAndFeelDecorated(true);
45+
System.setProperty("flatlaf.menuBarEmbedded", "true");
46+
4247
// Set X11 WM_CLASS property which is used as the application
4348
// name by Gnome 3 and other window managers.
4449
// https://github.com/processing/processing/issues/2534

app/src/processing/app/ui/Editor.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -618,12 +618,10 @@ public void updateTheme() {
618618
toolTipWarningColor = Theme.get("errors.selection.warning.bgcolor");
619619
toolTipErrorColor = Theme.get("errors.selection.error.bgcolor");
620620

621-
if(Platform.isWindows()) {
622-
UIManager.put("RootPane.background", color);
623-
UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
624-
getRootPane().updateUI();
625-
UIManager.put("RootPane.background", null);
626-
}
621+
UIManager.put("RootPane.background", color);
622+
UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
623+
getRootPane().updateUI();
624+
UIManager.put("RootPane.background", null);
627625

628626
JPopupMenu popup = modePopup.getPopupMenu();
629627
// Cannot use instanceof because com.formdev.flatlaf.ui.FlatPopupMenuBorder

0 commit comments

Comments
 (0)