From 494102b76587ad518a2c179522998056d47f6228 Mon Sep 17 00:00:00 2001
From: DieGurke <55625494+DieGurke@users.noreply.github.com>
Date: Mon, 23 Dec 2019 16:43:59 +0100
Subject: [PATCH] Javadoc and short notation
---
src/main/java/envoy/client/ui/PrimaryToggleSwitch.java | 7 ++-----
.../envoy/client/ui/settings/GeneralSettingsPanel.java | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/java/envoy/client/ui/PrimaryToggleSwitch.java b/src/main/java/envoy/client/ui/PrimaryToggleSwitch.java
index 8e91ab5..591f060 100644
--- a/src/main/java/envoy/client/ui/PrimaryToggleSwitch.java
+++ b/src/main/java/envoy/client/ui/PrimaryToggleSwitch.java
@@ -17,6 +17,7 @@ import envoy.client.SettingsItem;
* Created: 21 Dec 2019
*
* @author Maximilian Käfer
+ * @author Kai S. K. Engelbart
* @since Envoy v0.3-alpha
*/
public class PrimaryToggleSwitch extends JButton {
@@ -50,10 +51,6 @@ public class PrimaryToggleSwitch extends JButton {
g.fillRoundRect(0, 0, getWidth(), getHeight(), 25, 25);
g.setColor(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()).getInteractableBackgroundColor());
-
- if (state)
- g.fillRoundRect(25, 0, 25, 25, 25, 25);
- else
- g.fillRoundRect(0, 0, 25, 25, 25, 25);
+ g.fillRoundRect(state ? 25 : 0, 0, 25, 25, 25, 25);
}
}
\ No newline at end of file
diff --git a/src/main/java/envoy/client/ui/settings/GeneralSettingsPanel.java b/src/main/java/envoy/client/ui/settings/GeneralSettingsPanel.java
index 60e5458..ee8f619 100644
--- a/src/main/java/envoy/client/ui/settings/GeneralSettingsPanel.java
+++ b/src/main/java/envoy/client/ui/settings/GeneralSettingsPanel.java
@@ -19,7 +19,7 @@ import envoy.client.util.EnvoyLog;
* Displays GUI components that allow general settings regarding the client.
*
* Project: envoy-client
- * File: General.java
+ * File: GeneralSettingsPanel.java
* Created: 21 Dec 2019
*
* @author Maximilian Käfer