summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-10-08 23:08:11 -0400
committera1xd <[email protected]>2020-10-08 23:08:11 -0400
commitbcacf971e4cace869243edd5fff3fdb435d48c44 (patch)
tree2da2e0e956c8b92c24260ec9ed4fa3f0681c0a1a
parentdisable write button when settings are toggled off (diff)
downloadrawaccel-bcacf971e4cace869243edd5fff3fdb435d48c44.tar.xz
rawaccel-bcacf971e4cace869243edd5fff3fdb435d48c44.zip
add magic number to constants
-rw-r--r--grapher/Constants/Constants.cs4
-rw-r--r--grapher/Models/AccelGUI.cs2
2 files changed, 4 insertions, 2 deletions
diff --git a/grapher/Constants/Constants.cs b/grapher/Constants/Constants.cs
index c207b6d..d669d25 100644
--- a/grapher/Constants/Constants.cs
+++ b/grapher/Constants/Constants.cs
@@ -60,6 +60,8 @@ namespace grapher
/// <summary> Vertical placement of write button above bottom of sensitivity graph </summary>
public const int ButtonVerticalOffset = 60;
+ public const float SmallButtonSizeFactor = 0.666f;
+
/// <summary> Format string for shortened x and y textboxes. </summary>
public const string ShortenedFormatString = "0.###";
@@ -89,7 +91,7 @@ namespace grapher
/// <summary> Default text to be displayed on button delay. </summary>
public const string ButtonDelayText = "Delay";
-
+
/// <summary> Title of sensitivity chart. </summary>
public const string SensitivityChartTitle = "Sensitivity";
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs
index f75d284..dd1e37d 100644
--- a/grapher/Models/AccelGUI.cs
+++ b/grapher/Models/AccelGUI.cs
@@ -38,7 +38,7 @@ namespace grapher
AccelForm.DoResize();
DefaultButtonFont = WriteButton.Font;
- SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * 0.666f);
+ SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * Constants.SmallButtonSizeFactor);
MouseWatcher = mouseWatcher;