AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

commit 4056ab764661f14e79c790cff60a582631bcbfb0
parent ef872ca696558decb175d6eeb1f805972ce6cc8a
Author: jatinchowdhury18 <jatinchowdhury18@gmail.com>
Date:   Mon, 27 Jun 2022 01:03:29 +0100

Fixes for iOS (#278)

* Fixes for iOS

* Apply clang-format

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat:
MPlugin/CMakeLists.txt | 2+-
MPlugin/Source/GUI/IOSOnly/ScrollView.cpp | 2+-
MPlugin/Source/GUI/MyLNF.cpp | 13++++++++++++-
MPlugin/Source/GUI/MyLNF.h | 2++
4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.15) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment target") set(CMAKE_CXX_STANDARD 17) -project(CHOWTapeModel VERSION 2.10.0) +project(CHOWTapeModel VERSION 2.10.9) add_subdirectory(modules) include_directories(modules/RTNeural) diff --git a/Plugin/Source/GUI/IOSOnly/ScrollView.cpp b/Plugin/Source/GUI/IOSOnly/ScrollView.cpp @@ -11,7 +11,7 @@ ScrollView::ScrollView (foleys::MagicGUIBuilder& builder, ValueTree node) viewport.setScrollBarsShown (true, false); viewport.getVerticalScrollBar().setColour (ScrollBar::thumbColourId, Colour (0xFFEAA92C).withAlpha (0.7f)); viewport.setScrollBarThickness (10); - viewport.setScrollOnDragEnabled (false); + viewport.setScrollOnDragMode (Viewport::ScrollOnDragMode::all); dragToScrollListener = std::make_unique<DragToScrollListener> (viewport); } diff --git a/Plugin/Source/GUI/MyLNF.cpp b/Plugin/Source/GUI/MyLNF.cpp @@ -356,6 +356,17 @@ Component* MyLNF::getParentComponentForMenuOptions (const PopupMenu::Options& op return LookAndFeel_V2::getParentComponentForMenuOptions (options); } +PopupMenu::Options MyLNF::getOptionsForComboBoxPopupMenu (ComboBox& comboBox, Label& label) +{ + auto&& baseOptions = LookAndFeel_V4::getOptionsForComboBoxPopupMenu (comboBox, label); + +#if JUCE_IOS + return baseOptions.withParentComponent (comboBox.getTopLevelComponent()); +#else + return baseOptions; +#endif +} + //============================================================== void ComboBoxLNF::drawComboBox (Graphics& g, int width, int height, bool, int, int, int, int, ComboBox& box) { @@ -376,7 +387,7 @@ void ComboBoxLNF::drawComboBox (Graphics& g, int width, int height, bool, int, i void ComboBoxLNF::positionComboBoxText (ComboBox& box, Label& label) { - auto b = box.getBounds(); + auto b = box.getBounds().withPosition ({}); if (box.getName().isNotEmpty()) { diff --git a/Plugin/Source/GUI/MyLNF.h b/Plugin/Source/GUI/MyLNF.h @@ -25,6 +25,8 @@ public: Component* getParentComponentForMenuOptions (const PopupMenu::Options& options) override; + juce::PopupMenu::Options getOptionsForComboBoxPopupMenu (ComboBox& comboBox, Label& label) override; + private: std::unique_ptr<Drawable> knob = Drawable::createFromImageData (BinaryData::knob_svg, BinaryData::knob_svgSize); std::unique_ptr<Drawable> pointer = Drawable::createFromImageData (BinaryData::pointer_svg, BinaryData::pointer_svgSize);