diff --git a/source/gui/slider/compact_linear_slider/compact_linear_slider.cpp b/source/gui/slider/compact_linear_slider/compact_linear_slider.cpp index 3a024f2..10013a4 100644 --- a/source/gui/slider/compact_linear_slider/compact_linear_slider.cpp +++ b/source/gui/slider/compact_linear_slider/compact_linear_slider.cpp @@ -127,9 +127,9 @@ namespace zlInterface { editor.setColour(juce::TextEditor::outlineColourId, uiBase.getTextColor()); editor.setColour(juce::TextEditor::highlightedTextColourId, uiBase.getTextColor()); #if (USE_JUCE7_INSTEAD_OF_LATEST) - editor.applyFontToAllText(uiBase.getFontSize() * FontHuge); + editor.applyFontToAllText(uiBase.getFontSize() * editorFontScale); #else - editor.applyFontToAllText(juce::FontOptions{uiBase.getFontSize() * FontHuge}); + editor.applyFontToAllText(juce::FontOptions{uiBase.getFontSize() * editorFontScale}); #endif editor.applyColourToAllText(uiBase.getTextColor(), true); } @@ -145,7 +145,6 @@ namespace zlInterface { const auto actualValue = ctext.getDoubleValue() * k; slider.setValue(actualValue, juce::sendNotificationAsync); - leaveAnimation(); } diff --git a/source/gui/slider/compact_linear_slider/compact_linear_slider.hpp b/source/gui/slider/compact_linear_slider/compact_linear_slider.hpp index d03b313..2d748a6 100644 --- a/source/gui/slider/compact_linear_slider/compact_linear_slider.hpp +++ b/source/gui/slider/compact_linear_slider/compact_linear_slider.hpp @@ -64,6 +64,7 @@ namespace zlInterface { inline void setFontScale(const float x1, const float x2) { nameLookAndFeel.setFontScale(x1); textLookAndFeel.setFontScale(x2); + editorFontScale = x2; } private: @@ -73,6 +74,7 @@ namespace zlInterface { NameLookAndFeel nameLookAndFeel, textLookAndFeel; SnappingSlider slider; juce::Label label, text; + float editorFontScale{FontHuge}; friz::Animator animator{}; static constexpr int animationId = 1; diff --git a/source/gui/slider/two_value_rotary_slider/two_value_ratary_slider.cpp b/source/gui/slider/two_value_rotary_slider/two_value_ratary_slider.cpp index 05c4608..f270c0d 100644 --- a/source/gui/slider/two_value_rotary_slider/two_value_ratary_slider.cpp +++ b/source/gui/slider/two_value_rotary_slider/two_value_ratary_slider.cpp @@ -245,9 +245,9 @@ namespace zlInterface { editor.setColour(juce::TextEditor::outlineColourId, uiBase.getTextColor()); editor.setColour(juce::TextEditor::highlightedTextColourId, uiBase.getTextColor()); #if (USE_JUCE7_INSTEAD_OF_LATEST) - editor.applyFontToAllText(uiBase.getFontSize() * FontHuge); + editor.applyFontToAllText(uiBase.getFontSize() * editorFontScale); #else - editor.applyFontToAllText(juce::FontOptions{uiBase.getFontSize() * FontHuge}); + editor.applyFontToAllText(juce::FontOptions{uiBase.getFontSize() * editorFontScale}); #endif editor.applyColourToAllText(uiBase.getTextColor(), true); } diff --git a/source/gui/slider/two_value_rotary_slider/two_value_rotary_slider.hpp b/source/gui/slider/two_value_rotary_slider/two_value_rotary_slider.hpp index 94ace0c..b9b9489 100644 --- a/source/gui/slider/two_value_rotary_slider/two_value_rotary_slider.hpp +++ b/source/gui/slider/two_value_rotary_slider/two_value_rotary_slider.hpp @@ -76,6 +76,7 @@ namespace zlInterface { labelLookAndFeel.setFontScale(x1); labelLookAndFeel1.setFontScale(x2); labelLookAndFeel2.setFontScale(x2); + editorFontScale = x2; } private: @@ -90,6 +91,7 @@ namespace zlInterface { NameLookAndFeel textBoxLAF; juce::Label label, label1, label2; + float editorFontScale{FontHuge}; std::atomic showSlider2 = true, editable; std::atomic lrPad = 0, ubPad = 0;