commit a909373aad6d699cb1fd1ec07e02b6cbeef8353e
parent 4b2133557a519872e405033ec551539bbc714f3b
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Tue, 13 Aug 2024 21:08:59 +0200
fix context menu for text edit fields was twice as large as intended
Diffstat:
5 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/doc/changelog.txt b/doc/changelog.txt
@@ -6,6 +6,7 @@ Framework:
- [Fix] CLAP: Ranges of discrete parameters were not reported properly,
causing automation issues
+- [Fix] Context menu for text edit fields was twice as large as intended
Osirus:
diff --git a/source/juceUiLib/labelStyle.cpp b/source/juceUiLib/labelStyle.cpp
@@ -2,6 +2,11 @@
namespace genericUI
{
+ juce::Font LabelStyle::getPopupMenuFont()
+ {
+ return LookAndFeel_V4::getPopupMenuFont(); // NOLINT(bugprone-parent-virtual-call)
+ }
+
void LabelStyle::apply(juce::Label& _target) const
{
if(m_bgColor.getARGB())
diff --git a/source/juceUiLib/labelStyle.h b/source/juceUiLib/labelStyle.h
@@ -9,6 +9,8 @@ namespace genericUI
public:
explicit LabelStyle(Editor& _editor) : UiObjectStyle(_editor) {}
+ juce::Font getPopupMenuFont() override;
+
void apply(juce::Label& _target) const;
};
}
diff --git a/source/juceUiLib/textEditorStyle.cpp b/source/juceUiLib/textEditorStyle.cpp
@@ -2,6 +2,11 @@
namespace genericUI
{
+ juce::Font TextEditorStyle::getPopupMenuFont()
+ {
+ return LookAndFeel_V4::getPopupMenuFont(); // NOLINT(bugprone-parent-virtual-call)
+ }
+
void TextEditorStyle::apply(juce::TextEditor& _target) const
{
_target.setColour(juce::TextEditor::ColourIds::backgroundColourId, m_bgColor);
diff --git a/source/juceUiLib/textEditorStyle.h b/source/juceUiLib/textEditorStyle.h
@@ -9,6 +9,7 @@ namespace genericUI
public:
explicit TextEditorStyle(Editor& _editor) : UiObjectStyle(_editor) {}
+ juce::Font getPopupMenuFont() override;
public:
void apply(juce::TextEditor& _target) const;
};