jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] 02/03: Mention available darklaf properties. Ensure that 'darklaf.allowNativeCode' is set to 'true' if 'darklaf.decorations' is 'true'.
Date Thu, 20 Aug 2020 16:29:46 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 28e11b860a7c4ef646a339bf9f949206f282560f
Author: weisj <weisj@arcor.de>
AuthorDate: Wed Aug 19 20:25:43 2020 +0200

    Mention available darklaf properties.
    Ensure that 'darklaf.allowNativeCode' is set to 'true' if 'darklaf.decorations' is 'true'.
---
 bin/jmeter.properties                                         |  8 ++++++++
 .../java/org/apache/jmeter/gui/action/LookAndFeelCommand.java |  6 ++++++
 xdocs/usermanual/properties_reference.xml                     | 11 +++++++++++
 3 files changed, 25 insertions(+)

diff --git a/bin/jmeter.properties b/bin/jmeter.properties
index 96efa71..c3e78c3 100644
--- a/bin/jmeter.properties
+++ b/bin/jmeter.properties
@@ -140,6 +140,14 @@
 # See https://bz.apache.org/bugzilla/show_bug.cgi?id=52026 for details
 # N.B. the LAF can be defined in user.properties.
 
+# Enable custom window chrome for Darklaf Look and Feels.
+# defaults to false
+# darklaf.decorations=false
+
+# Enables the unified menubar for Darklaf Look and Feels.
+# defaults to true
+# darklaf.unifiedMenuBar=true
+
 # LoggerPanel display
 # default to false
 #jmeter.loggerpanel.display=false
diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
index 5e549ac..3a5b82c 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
@@ -95,10 +95,16 @@ public class LookAndFeelCommand extends AbstractAction {
     static {
         if (System.getProperty("darklaf.decorations") == null) {
             System.setProperty("darklaf.decorations", "false");
+        } else if ("true".equals(System.getProperty("darklaf.allowNativeCode"))) {
+            // darklaf.allowNativeCode=true is required for darklaf.decorations=true to work.
+            System.setProperty("darklaf.decorations", "true");
         }
         if (System.getProperty("darklaf.allowNativeCode") == null) {
             System.setProperty("darklaf.allowNativeCode", "false");
         }
+        if (System.getProperty("darklaf.unifiedMenuBar") == null) {
+            System.setProperty("darklaf.unifiedMenuBar", "true");
+        }
         UIManager.installLookAndFeel(JMeterMenuBar.DARCULA_LAF, JMeterMenuBar.DARCULA_LAF_CLASS);
 
         List<MenuItem> items = new ArrayList<>();
diff --git a/xdocs/usermanual/properties_reference.xml b/xdocs/usermanual/properties_reference.xml
index 2674bbb..18cdbad 100644
--- a/xdocs/usermanual/properties_reference.xml
+++ b/xdocs/usermanual/properties_reference.xml
@@ -196,6 +196,17 @@ Defaults to: <code>true</code>
     Defaults to: <code>500</code></property>
 </properties>
 </section>
+<section name="&sect-num;.4.1 Darklaf configuration" anchor="darklaf_config">
+<properties>
+    <property name="darklaf.decorations">
+        Enables custom window chrome when using a Darklaf Look And Feel.
+        Defaults to: <code>false</code></property>
+    <property name="darklaf.unifiedMenuBar">
+        Enables the unified menubar on Windows when using a Darklaf Look and Feel.<br/>
+        This property only has an effect if <code>darklaf.native</code> is <code>true</code>.
+        Defaults to: <code>true</code></property>
+</properties>
+</section>
 <section name="&sect-num;.5 Toolbar display" anchor="toolbar_display">
 <properties>
 <property name="jmeter.toolbar.icons">


Mime
View raw message