From 7ff6b324579e779191cd0083f9ed2bf1f694dc45 Mon Sep 17 00:00:00 2001 From: Timothy Schoen Date: Sun, 26 Jan 2025 14:50:31 +0100 Subject: [PATCH] Fix welcome panel thumbnail clipping --- Libraries/CMakeLists.txt | 3 +++ Source/Components/WelcomePanel.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Libraries/CMakeLists.txt b/Libraries/CMakeLists.txt index a070dd14c..de8c1215a 100755 --- a/Libraries/CMakeLists.txt +++ b/Libraries/CMakeLists.txt @@ -5,7 +5,10 @@ cmake_minimum_required(VERSION 3.15) # ------------------------------------------------------------------------------# project(libpd VERSION 1.0.0 LANGUAGES C CXX) +set(MESSAGE_QUIET ON) +message(STATUS "Configuring fftw3") add_subdirectory(fftw3) +set(MESSAGE_QUIET OFF) if(MSVC) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) diff --git a/Source/Components/WelcomePanel.h b/Source/Components/WelcomePanel.h index c0c2e61c3..325ced620 100644 --- a/Source/Components/WelcomePanel.h +++ b/Source/Components/WelcomePanel.h @@ -528,6 +528,8 @@ class WelcomePanel final : public Component auto const lB = bounds.toFloat().expanded(0.5f); // Draw background even for images incase there is a transparent PNG nvgDrawRoundedRect(nvg, lB.getX(), lB.getY(), lB.getWidth(), lB.getHeight(), convertColour(findColour(PlugDataColour::panelForegroundColourId)), convertColour(findColour(PlugDataColour::toolbarOutlineColourId)), Corners::largeCornerRadius); + + nvgRoundedScissor(nvg,lB.getX(), lB.getY(), lB.getWidth(), lB.getHeight(), Corners::largeCornerRadius); if (thumbnailImageData.isValid()) { // Render the thumbnail image file that is in the root dir of the pd patch auto const sB = bounds.toFloat().reduced(0.2f);