Windows look & feel

This commit is contained in:
Stef Tervelde
2024-12-18 20:01:58 +01:00
parent 7fb8b2f16a
commit 2fc0d69a4c

View File

@@ -48,6 +48,7 @@ import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.undo.*;
import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.util.SystemInfo;
import processing.app.Base;
import processing.app.Formatter;
@@ -594,6 +595,13 @@ 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);
}
JPopupMenu popup = modePopup.getPopupMenu();
// Cannot use instanceof because com.formdev.flatlaf.ui.FlatPopupMenuBorder
// is a subclass of EmptyBorder, so just override each time. Cannot set