mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #1006 from Stefterv/linux-visual-fix
Visual fixes for Linux
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# The default is 8, which creates tiny nubby scroll bars
|
||||
ScrollBar.width = 16
|
||||
|
||||
TitlePane.inactiveForeground = #000000
|
||||
|
||||
|
||||
# Better matched for macOS dark mode (but using everywhere)
|
||||
# https://github.com/JFormDesigner/FlatLaf/issues/497
|
||||
|
||||
[dark]@background = #1e1e1e
|
||||
[dark]@foreground = #e0e0e0
|
||||
[dark]@accentColor = #107aff
|
||||
[dark]@accentFocusColor = #176896
|
||||
|
||||
[dark]Component.arrowType = chevron
|
||||
|
||||
[dark]CheckBox.icon.style = filled
|
||||
[dark]CheckBox.icon[filled].selectedBorderColor = @accentColor
|
||||
[dark]CheckBox.icon[filled].selectedBackground = @accentColor
|
||||
[dark]CheckBox.icon[filled].checkmarkColor = @foreground
|
||||
|
||||
[dark]RadioButton.icon.style = filled
|
||||
[dark]RadioButton.icon[filled].centerDiameter = 6
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user