Visual fixes for Linux

This commit is contained in:
Stef Tervelde
2025-03-24 19:34:42 +01:00
parent 88f2a82d9c
commit ae1bbad84f
2 changed files with 9 additions and 6 deletions
@@ -31,6 +31,8 @@ import processing.app.Messages;
import processing.app.Preferences;
import processing.core.PApplet;
import javax.swing.*;
public class LinuxPlatform extends DefaultPlatform {
String homeDir;
@@ -39,6 +41,9 @@ public class LinuxPlatform extends DefaultPlatform {
public void initBase(Base base) {
super.initBase(base);
JFrame.setDefaultLookAndFeelDecorated(true);
System.setProperty("flatlaf.menuBarEmbedded", "true");
// Set X11 WM_CLASS property which is used as the application
// name by Gnome 3 and other window managers.
// https://github.com/processing/processing/issues/2534
+4 -6
View File
@@ -618,12 +618,10 @@ public abstract class Editor extends JFrame implements RunnerListener {
toolTipWarningColor = Theme.get("errors.selection.warning.bgcolor");
toolTipErrorColor = Theme.get("errors.selection.error.bgcolor");
if(Platform.isWindows()) {
UIManager.put("RootPane.background", color);
UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
getRootPane().updateUI();
UIManager.put("RootPane.background", null);
}
UIManager.put("RootPane.background", color);
UIManager.put("TitlePane.embeddedForeground", Theme.getColor("editor.fgcolor"));
getRootPane().updateUI();
UIManager.put("RootPane.background", null);
JPopupMenu popup = modePopup.getPopupMenu();
// Cannot use instanceof because com.formdev.flatlaf.ui.FlatPopupMenuBorder