Replaced low and high ComboBoxes with ToggleButtons and implemented the logic for switching between modes.

This commit is contained in:
Legaeli 2025-11-10 17:49:12 +01:00
parent 857e0655fd
commit 9f1999d7b2
6 changed files with 246 additions and 78 deletions

View File

@ -671,6 +671,7 @@ class PresetMenuButtonLookAndFeel : public juce::LookAndFeel_V4 {
}
}
private:

View File

@ -11423,24 +11423,43 @@ const char* preset_menu_icon_svg = (const char*) temp_binary_data_7;
//================== crystalize_button_active_icon.svg ==================
static const unsigned char temp_binary_data_8[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<svg id=\"Ebene_1\" data-name=\"Ebene 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 32\">\n"
" <rect width=\"64\" height=\"32\" rx=\"5.96\" ry=\"5.96\" fill=\"#00f9ff\"/>\n"
" <g>\n"
" <path d=\"M3.73,18.88c-.18,0-.34-.04-.48-.13-.15-.09-.26-.2-.35-.35-.09-.15-.13-.31-.13-.48v-3.84c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35.15-.09.31-.13.48-.13h4.78v.65H3.73c-.09,0-.16.03-.22.09s-.09.13-.09.22v3.84c0,.09.03.16.09.22.06.06.13.09.22"
".09h4.78v.65H3.73Z\" fill=\"#fff\"/>\n"
" <path d=\"M9.34,18.88v-5.75h4.8c.18,0,.34.04.48.13s.26.2.35.35c.08.14.13.3.13.48v1.69c0,.18-.04.34-.13.48-.09.14-.2.26-.35.35s-.31.13-.48.13h-4.15v2.14h-.65ZM10.3,16.08h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.69c0-.09-.03-.16-.09-.22s-."
"13-.09-.22-.09h-3.84c-.09,0-.16.03-.22.09s-.09.13-.09.22v1.69c0,.09.03.16.09.22.06.06.13.09.22.09ZM14.21,18.88l-1.88-2.24h.85l1.89,2.23h0s-.86,0-.86,0Z\" fill=\"#fff\"/>\n"
" <path d=\"M18.4,18.88v-2.17l-2.65-3.59h.74l2.23,2.82,2.21-2.82h.76l-2.65,3.59v2.17h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M23.03,18.88c-.18,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.15-.13-.31-.13-.48v-.22h.65v.22c0,.09.03.16.09.22.06.06.13.09.22.09h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.29c0-.08-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.18,"
"0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.14-.13-.3-.13-.48v-1.29c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35s.31-.13.48-.13h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.15.13.31.13.48v.22h-.65v-.22c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.09,0"
"-.16.03-.22.09-.06.06-.09.13-.09.22v1.29c0,.09.03.16.09.22s.13.09.22.09h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.14.13.3.13.48v1.29c0,.18-.04.34-.13.48-.09.15-.2.26-.35.35-.15.09-.31.13-.48.13h-3.84Z\" fill=\"#fff\"/>\n"
" <path d=\"M30.96,18.88v-5.11h-2.56v-.65h5.76v.65h-2.55v5.11h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M34.78,14.08c0-.18.04-.34.13-.48.09-.15.2-.26.35-.35.15-.09.31-.13.48-.13h3.84c.18,0,.34.04.48.13s.26.2.35.35c.09.15.13.31.13.48v4.8h-.65v-2.1h-4.46v2.1h-.65v-4.8ZM39.89,16.13v-2.05c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-."
"08,0-.16.03-.22.09-.06.06-.09.13-.09.22v2.05h4.46Z\" fill=\"#fff\"/>\n"
" <path d=\"M41.46,18.88v-5.77h.65v5.12h5.11v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M47.76,18.88v-5.76h.66v5.76h-.66Z\" fill=\"#fff\"/>\n"
" <path d=\"M49.35,18.88v-.89l5.02-4.22h-5.02v-.65h5.76v.89l-5.02,4.22h5.02v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M55.98,18.88v-5.76h5.26v.65h-4.61v1.9h3.7v.66h-3.7v1.9h4.61v.65h-5.26Z\" fill=\"#fff\"/>\n"
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 80 32.45\">\n"
" <defs>\n"
" <linearGradient id=\"Unbenannter_Verlauf_16\" data-name=\"Unbenannter Verlauf 16\" x1=\"8.69\" y1=\"31.46\" x2=\"70.94\" y2=\"1.29\" gradientUnits=\"userSpaceOnUse\">\n"
" <stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".1\"/>\n"
" <stop offset=\".48\" stop-color=\"#fff\" stop-opacity=\".3\"/>\n"
" <stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".5\"/>\n"
" </linearGradient>\n"
" </defs>\n"
" <g id=\"Ebene_2\" data-name=\"Ebene 2\">\n"
" <rect x=\"8\" y=\".22\" width=\"64\" height=\"32\" rx=\"5.96\" ry=\"5.96\" fill=\"#3db7b7\"/>\n"
" <rect x=\"8\" y=\".22\" width=\"64\" height=\"32\" rx=\"5.96\" ry=\"5.96\" fill=\"#56feff\"/>\n"
" </g>\n"
" <g id=\"Ebene_1\" data-name=\"Ebene 1\">\n"
" <g>\n"
" <path d=\"M11.73,19.11c-.18,0-.34-.04-.48-.13-.15-.09-.26-.2-.35-.35-.09-.15-.13-.31-.13-.48v-3.84c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35.15-.09.31-.13.48-.13h4.78v.65h-4.78c-.09,0-.16.03-.22.09s-.09.13-.09.22v3.84c0,.09.03.16.09.22.06.06.13.0"
"9.22.09h4.78v.65h-4.78Z\" fill=\"#fff\"/>\n"
" <path d=\"M17.34,19.11v-5.75h4.8c.18,0,.34.04.48.13s.26.2.35.35c.08.14.13.3.13.48v1.69c0,.18-.04.34-.13.48-.09.14-.2.26-.35.35s-.31.13-.48.13h-4.15v2.14h-.65ZM18.3,16.31h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.69c0-.09-.03-.16-.09-.22"
"s-.13-.09-.22-.09h-3.84c-.09,0-.16.03-.22.09s-.09.13-.09.22v1.69c0,.09.03.16.09.22.06.06.13.09.22.09ZM22.21,19.11l-1.88-2.24h.85l1.89,2.23h0s-.86,0-.86,0Z\" fill=\"#fff\"/>\n"
" <path d=\"M26.4,19.11v-2.17l-2.65-3.59h.74l2.23,2.82,2.21-2.82h.76l-2.65,3.59v2.17h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M31.03,19.11c-.18,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.15-.13-.31-.13-.48v-.22h.65v.22c0,.09.03.16.09.22.06.06.13.09.22.09h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.29c0-.08-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.1"
"8,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.14-.13-.3-.13-.48v-1.29c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35s.31-.13.48-.13h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.15.13.31.13.48v.22h-.65v-.22c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.09"
",0-.16.03-.22.09-.06.06-.09.13-.09.22v1.29c0,.09.03.16.09.22s.13.09.22.09h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.14.13.3.13.48v1.29c0,.18-.04.34-.13.48-.09.15-.2.26-.35.35-.15.09-.31.13-.48.13h-3.84Z\" fill=\"#fff\"/>\n"
" <path d=\"M38.96,19.11v-5.11h-2.56v-.65h5.76v.65h-2.55v5.11h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M42.78,14.31c0-.18.04-.34.13-.48.09-.15.2-.26.35-.35.15-.09.31-.13.48-.13h3.84c.18,0,.34.04.48.13s.26.2.35.35c.09.15.13.31.13.48v4.8h-.65v-2.1h-4.46v2.1h-.65v-4.8ZM47.89,16.36v-2.05c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c"
"-.08,0-.16.03-.22.09-.06.06-.09.13-.09.22v2.05h4.46Z\" fill=\"#fff\"/>\n"
" <path d=\"M49.46,19.11v-5.77h.65v5.12h5.11v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M55.76,19.11v-5.76h.66v5.76h-.66Z\" fill=\"#fff\"/>\n"
" <path d=\"M57.35,19.11v-.89l5.02-4.22h-5.02v-.65h5.76v.89l-5.02,4.22h5.02v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M63.98,19.11v-5.76h5.26v.65h-4.61v1.9h3.7v.66h-3.7v1.9h4.61v.65h-5.26Z\" fill=\"#fff\"/>\n"
" </g>\n"
" </g>\n"
" <g id=\"Ebene_3_Kopie_Kopie_Kopie\" data-name=\"Ebene 3 Kopie Kopie Kopie\">\n"
" <path d=\"M56,24.22l8-4,8,4h-16ZM48,20.22h16l-8-4-8,4ZM72,12.22v-4l-8,4h8ZM72,16.22l-8-4-8,4h16ZM69.61,1.42l-5.61,2.81h7.66c-.39-1.13-1.12-2.1-2.05-2.81ZM72,8.22l-8-4-8,4h16ZM48,12.22h16l-8-4-8,4ZM56,.22l-8,4h16L56,.22ZM48,28.22h16l-8-4-8,4ZM72,2"
"0.22v-4l-8,4h8ZM56,24.22l-8-4-8,4h16ZM40,8.22l-8,4h16l-8-4ZM32,12.22l-8,4h16l-8-4ZM40,16.22l-8,4h16l-8-4ZM32,20.22l-8,4h16l-8-4ZM71.66,28.22c.21-.61.34-1.27.34-1.96v-2.04l-8,4h7.66ZM56,16.22l-8-4-8,4h16ZM32,28.22h16l-8-4-8,4ZM56,8.22l-8-4-8,4h16ZM8,2"
"0.22h8l-8-4v4ZM24,32.22h16l-8-4-8,4ZM24,24.22l-8,4h16l-8-4ZM8,12.22h8l-8-4v4ZM16,20.22l-8,4h16l-8-4ZM10.39,31.03c1,.75,2.23,1.19,3.57,1.19h10.04l-8-4-5.61,2.81ZM64,28.22l-8,4h10.04c1.34,0,2.57-.45,3.57-1.19l-5.61-2.81ZM8.34,4.22h7.66l-5.61-2.81c-.94."
"7-1.66,1.68-2.05,2.81ZM40,32.22h16l-8-4-8,4ZM8,26.27c0,.69.12,1.34.34,1.96h7.66l-8-4v2.04ZM40,.22l-8,4h16L40,.22ZM16,4.22l-8,4h16l-8-4ZM24,8.22l-8,4h16l-8-4ZM40,8.22l-8-4-8,4h16ZM16,12.22l-8,4h16l-8-4ZM24,.22l-8,4h16L24,.22ZM24,16.22l-8,4h16l-8-4Z\" "
"fill=\"url(#Unbenannter_Verlauf_16)\"/>\n"
" </g>\n"
"</svg>";
@ -11449,24 +11468,42 @@ const char* crystalize_button_active_icon_svg = (const char*) temp_binary_data_8
//================== crystalize_button_passive_icon.svg ==================
static const unsigned char temp_binary_data_9[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<svg id=\"Ebene_2\" data-name=\"Ebene 2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 64 32\">\n"
" <rect width=\"64\" height=\"32\" rx=\"5.96\" ry=\"5.96\" fill=\"#13009b\"/>\n"
" <g>\n"
" <path d=\"M3.73,18.88c-.18,0-.34-.04-.48-.13-.15-.09-.26-.2-.35-.35-.09-.15-.13-.31-.13-.48v-3.84c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35.15-.09.31-.13.48-.13h4.78v.65H3.73c-.09,0-.16.03-.22.09s-.09.13-.09.22v3.84c0,.09.03.16.09.22.06.06.13.09.22"
".09h4.78v.65H3.73Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M9.34,18.88v-5.75h4.8c.18,0,.34.04.48.13s.26.2.35.35c.08.14.13.3.13.48v1.69c0,.18-.04.34-.13.48-.09.14-.2.26-.35.35s-.31.13-.48.13h-4.15v2.14h-.65ZM10.3,16.08h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.69c0-.09-.03-.16-.09-.22s-."
"13-.09-.22-.09h-3.84c-.09,0-.16.03-.22.09s-.09.13-.09.22v1.69c0,.09.03.16.09.22.06.06.13.09.22.09ZM14.21,18.88l-1.88-2.24h.85l1.89,2.23h0s-.86,0-.86,0Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M18.4,18.88v-2.17l-2.65-3.59h.74l2.23,2.82,2.21-2.82h.76l-2.65,3.59v2.17h-.65Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M23.03,18.88c-.18,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.15-.13-.31-.13-.48v-.22h.65v.22c0,.09.03.16.09.22.06.06.13.09.22.09h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.29c0-.08-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.18,"
"0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.14-.13-.3-.13-.48v-1.29c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35s.31-.13.48-.13h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.15.13.31.13.48v.22h-.65v-.22c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.09,0"
"-.16.03-.22.09-.06.06-.09.13-.09.22v1.29c0,.09.03.16.09.22s.13.09.22.09h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.14.13.3.13.48v1.29c0,.18-.04.34-.13.48-.09.15-.2.26-.35.35-.15.09-.31.13-.48.13h-3.84Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M30.96,18.88v-5.11h-2.56v-.65h5.76v.65h-2.55v5.11h-.65Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M34.78,14.08c0-.18.04-.34.13-.48.09-.15.2-.26.35-.35.15-.09.31-.13.48-.13h3.84c.18,0,.34.04.48.13s.26.2.35.35c.09.15.13.31.13.48v4.8h-.65v-2.1h-4.46v2.1h-.65v-4.8ZM39.89,16.13v-2.05c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-."
"08,0-.16.03-.22.09-.06.06-.09.13-.09.22v2.05h4.46Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M41.46,18.88v-5.77h.65v5.12h5.11v.65h-5.76Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M47.76,18.88v-5.76h.66v5.76h-.66Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M49.35,18.88v-.89l5.02-4.22h-5.02v-.65h5.76v.89l-5.02,4.22h5.02v.65h-5.76Z\" fill=\"#4c4c4c\"/>\n"
" <path d=\"M55.98,18.88v-5.76h5.26v.65h-4.61v1.9h3.7v.66h-3.7v1.9h4.61v.65h-5.26Z\" fill=\"#4c4c4c\"/>\n"
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 80 32.45\">\n"
" <defs>\n"
" <linearGradient id=\"Unbenannter_Verlauf_16\" data-name=\"Unbenannter Verlauf 16\" x1=\"8.69\" y1=\"31.46\" x2=\"70.94\" y2=\"1.29\" gradientUnits=\"userSpaceOnUse\">\n"
" <stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".1\"/>\n"
" <stop offset=\".48\" stop-color=\"#fff\" stop-opacity=\".3\"/>\n"
" <stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".5\"/>\n"
" </linearGradient>\n"
" </defs>\n"
" <g id=\"Ebene_2\" data-name=\"Ebene 2\">\n"
" <rect x=\"8\" y=\".22\" width=\"64\" height=\"32\" rx=\"5.96\" ry=\"5.96\" fill=\"#3db7b7\"/>\n"
" </g>\n"
" <g id=\"Ebene_1\" data-name=\"Ebene 1\">\n"
" <g>\n"
" <path d=\"M11.73,19.11c-.18,0-.34-.04-.48-.13-.15-.09-.26-.2-.35-.35-.09-.15-.13-.31-.13-.48v-3.84c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35.15-.09.31-.13.48-.13h4.78v.65h-4.78c-.09,0-.16.03-.22.09s-.09.13-.09.22v3.84c0,.09.03.16.09.22.06.06.13.0"
"9.22.09h4.78v.65h-4.78Z\" fill=\"#fff\"/>\n"
" <path d=\"M17.34,19.11v-5.75h4.8c.18,0,.34.04.48.13s.26.2.35.35c.08.14.13.3.13.48v1.69c0,.18-.04.34-.13.48-.09.14-.2.26-.35.35s-.31.13-.48.13h-4.15v2.14h-.65ZM18.3,16.31h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.69c0-.09-.03-.16-.09-.22"
"s-.13-.09-.22-.09h-3.84c-.09,0-.16.03-.22.09s-.09.13-.09.22v1.69c0,.09.03.16.09.22.06.06.13.09.22.09ZM22.21,19.11l-1.88-2.24h.85l1.89,2.23h0s-.86,0-.86,0Z\" fill=\"#fff\"/>\n"
" <path d=\"M26.4,19.11v-2.17l-2.65-3.59h.74l2.23,2.82,2.21-2.82h.76l-2.65,3.59v2.17h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M31.03,19.11c-.18,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.15-.13-.31-.13-.48v-.22h.65v.22c0,.09.03.16.09.22.06.06.13.09.22.09h3.84c.08,0,.16-.03.22-.09.06-.06.09-.13.09-.22v-1.29c0-.08-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.1"
"8,0-.34-.04-.48-.13s-.26-.2-.35-.35c-.09-.14-.13-.3-.13-.48v-1.29c0-.18.04-.34.13-.48.08-.15.2-.26.35-.35s.31-.13.48-.13h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.15.13.31.13.48v.22h-.65v-.22c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c-.09"
",0-.16.03-.22.09-.06.06-.09.13-.09.22v1.29c0,.09.03.16.09.22s.13.09.22.09h3.84c.18,0,.34.04.48.13.15.09.26.2.35.35.08.14.13.3.13.48v1.29c0,.18-.04.34-.13.48-.09.15-.2.26-.35.35-.15.09-.31.13-.48.13h-3.84Z\" fill=\"#fff\"/>\n"
" <path d=\"M38.96,19.11v-5.11h-2.56v-.65h5.76v.65h-2.55v5.11h-.65Z\" fill=\"#fff\"/>\n"
" <path d=\"M42.78,14.31c0-.18.04-.34.13-.48.09-.15.2-.26.35-.35.15-.09.31-.13.48-.13h3.84c.18,0,.34.04.48.13s.26.2.35.35c.09.15.13.31.13.48v4.8h-.65v-2.1h-4.46v2.1h-.65v-4.8ZM47.89,16.36v-2.05c0-.09-.03-.16-.09-.22-.06-.06-.13-.09-.22-.09h-3.84c"
"-.08,0-.16.03-.22.09-.06.06-.09.13-.09.22v2.05h4.46Z\" fill=\"#fff\"/>\n"
" <path d=\"M49.46,19.11v-5.77h.65v5.12h5.11v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M55.76,19.11v-5.76h.66v5.76h-.66Z\" fill=\"#fff\"/>\n"
" <path d=\"M57.35,19.11v-.89l5.02-4.22h-5.02v-.65h5.76v.89l-5.02,4.22h5.02v.65h-5.76Z\" fill=\"#fff\"/>\n"
" <path d=\"M63.98,19.11v-5.76h5.26v.65h-4.61v1.9h3.7v.66h-3.7v1.9h4.61v.65h-5.26Z\" fill=\"#fff\"/>\n"
" </g>\n"
" </g>\n"
" <g id=\"Ebene_3_Kopie_Kopie_Kopie\" data-name=\"Ebene 3 Kopie Kopie Kopie\">\n"
" <path d=\"M56,24.22l8-4,8,4h-16ZM48,20.22h16l-8-4-8,4ZM72,12.22v-4l-8,4h8ZM72,16.22l-8-4-8,4h16ZM69.61,1.42l-5.61,2.81h7.66c-.39-1.13-1.12-2.1-2.05-2.81ZM72,8.22l-8-4-8,4h16ZM48,12.22h16l-8-4-8,4ZM56,.22l-8,4h16L56,.22ZM48,28.22h16l-8-4-8,4ZM72,2"
"0.22v-4l-8,4h8ZM56,24.22l-8-4-8,4h16ZM40,8.22l-8,4h16l-8-4ZM32,12.22l-8,4h16l-8-4ZM40,16.22l-8,4h16l-8-4ZM32,20.22l-8,4h16l-8-4ZM71.66,28.22c.21-.61.34-1.27.34-1.96v-2.04l-8,4h7.66ZM56,16.22l-8-4-8,4h16ZM32,28.22h16l-8-4-8,4ZM56,8.22l-8-4-8,4h16ZM8,2"
"0.22h8l-8-4v4ZM24,32.22h16l-8-4-8,4ZM24,24.22l-8,4h16l-8-4ZM8,12.22h8l-8-4v4ZM16,20.22l-8,4h16l-8-4ZM10.39,31.03c1,.75,2.23,1.19,3.57,1.19h10.04l-8-4-5.61,2.81ZM64,28.22l-8,4h10.04c1.34,0,2.57-.45,3.57-1.19l-5.61-2.81ZM8.34,4.22h7.66l-5.61-2.81c-.94."
"7-1.66,1.68-2.05,2.81ZM40,32.22h16l-8-4-8,4ZM8,26.27c0,.69.12,1.34.34,1.96h7.66l-8-4v2.04ZM40,.22l-8,4h16L40,.22ZM16,4.22l-8,4h16l-8-4ZM24,8.22l-8,4h16l-8-4ZM40,8.22l-8-4-8,4h16ZM16,12.22l-8,4h16l-8-4ZM24,.22l-8,4h16L24,.22ZM24,16.22l-8,4h16l-8-4Z\" "
"fill=\"url(#Unbenannter_Verlauf_16)\" opacity=\".5\"/>\n"
" </g>\n"
"</svg>";
@ -11502,8 +11539,8 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes)
case 0x9c8232dc: numBytes = 24716; return OrbitronRegular_ttf;
case 0x93fe9a1e: numBytes = 146004; return RobotoRegular_ttf;
case 0x4df4bf1e: numBytes = 350; return preset_menu_icon_svg;
case 0xd842aaab: numBytes = 2478; return crystalize_button_active_icon_svg;
case 0x885a7642: numBytes = 2508; return crystalize_button_passive_icon_svg;
case 0xd842aaab: numBytes = 4212; return crystalize_button_active_icon_svg;
case 0x885a7642: numBytes = 4141; return crystalize_button_passive_icon_svg;
case 0xe49e0f15: numBytes = 406; return bypass_icon_svg;
default: break;
}

View File

@ -33,10 +33,10 @@ namespace BinaryData
const int preset_menu_icon_svgSize = 350;
extern const char* crystalize_button_active_icon_svg;
const int crystalize_button_active_icon_svgSize = 2478;
const int crystalize_button_active_icon_svgSize = 4212;
extern const char* crystalize_button_passive_icon_svg;
const int crystalize_button_passive_icon_svgSize = 2508;
const int crystalize_button_passive_icon_svgSize = 4141;
extern const char* bypass_icon_svg;
const int bypass_icon_svgSize = 406;

View File

@ -21,31 +21,7 @@ using Layout = DesignSystem::Layout;
using Components = DesignSystem::Components;
using SliderStyles = Components::SliderStyles;
//region setupModeBoxes
void CrystalizerEQAudioProcessorEditor::setupModeBoxes() {
if (auto* choice = dynamic_cast<juce::AudioParameterChoice*>(
audioProcessor.apvts.getParameter("LowBandModes")))
{
lowBandModeBox.addItemList (choice->choices, 1);
lowBandModeBox.setSelectedItemIndex (choice->getIndex(), juce::dontSendNotification);
lowBandModeAttach = std::make_unique<ComboBoxAttach>(
audioProcessor.apvts, "LowBandModes", lowBandModeBox);
}
if (auto* choice = dynamic_cast<juce::AudioParameterChoice*>(
audioProcessor.apvts.getParameter("HighBandModes")))
{
highBandModeBox.addItemList (choice->choices, 1);
highBandModeBox.setSelectedItemIndex (choice->getIndex(), juce::dontSendNotification);
highBandModeAttach = std::make_unique<ComboBoxAttach>(
audioProcessor.apvts, "HighBandModes", highBandModeBox);
}
}
//endregion setupModeBoxes
//region setupSliders
void CrystalizerEQAudioProcessorEditor::setupSliders() {
@ -83,7 +59,6 @@ void CrystalizerEQAudioProcessorEditor::setupAttachments() {
lowBandSlopeAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "LowBandSlope", lowBandSlopeSlider);
lowBandGainAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "LowBandGain", lowBandGainSlider);
lowBandQAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "LowBandQ", lowBandQSlider);
lowBandModeAttach = std::make_unique<ComboBoxAttach>(audioProcessor.apvts, "LowBandModes", lowBandModeBox);
peak1FreqAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "Peak1Freq", peak1FreqSlider);
peak1GainAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "Peak1Gain", peak1GainSlider);
@ -101,7 +76,6 @@ void CrystalizerEQAudioProcessorEditor::setupAttachments() {
highBandSlopeAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "HighBandSlope", highBandSlopeSlider);
highBandGainAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "HighBandGain", highBandGainSlider);
highBandQAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "HighBandQ", highBandQSlider);
highBandModeAttach = std::make_unique<ComboBoxAttach>(audioProcessor.apvts, "HighBandModes", highBandModeBox);
inputAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "InputGain", inputSlider);
outputAttach = std::make_unique<SliderAttach>(audioProcessor.apvts, "OutputGain", outputSlider);
@ -114,6 +88,11 @@ void CrystalizerEQAudioProcessorEditor::setupDisplayNames() {
testNoiseSlider.setName("TestNoise");
lowBypass.setName("LowBypass");
lowBell.setName("LowBell");
lowCut.setName("LowCut");
lowShelf.setName("LowShelf");
lowBandModeBox.setName("LowBandModeBox");
lowBandFreqSlider.setName ("LowBand Freq");
lowBandSlopeSlider.setName ("LowBand Slope");
lowBandGainSlider.setName ("LowBand Gain");
@ -131,6 +110,11 @@ void CrystalizerEQAudioProcessorEditor::setupDisplayNames() {
peak3GainSlider.setName("Peak3 Gain");
peak3QSlider.setName ("Peak3 Q");
highBypass.setName("HighBypass");
highBell.setName("HighBell");
highCut.setName("HighCut");
highShelf.setName("HighShelf");
highBandModeBox.setName("HighBandModeBox");
highBandFreqSlider.setName ("HighBand Freq");
highBandSlopeSlider.setName ("HighBand Slope");
highBandGainSlider.setName ("HighBand Gain");
@ -161,6 +145,7 @@ void CrystalizerEQAudioProcessorEditor::setupDisplayNames() {
//peak3QSlider.setTextValueSuffix("\nQ");
peak3BypassButton.setName("peak3Bypass");
//highBandFreqSlider.setTextValueSuffix ("\nHz");
highBandSlopeSlider.setTextValueSuffix ("\ndB/Oct");
highBandGainSlider.setTextValueSuffix("\ndB");
@ -202,6 +187,9 @@ void CrystalizerEQAudioProcessorEditor::setupToggleButtons() {
crystalizeButton.setLookAndFeel(svgToggleButtonLookAndFeel.get());
presetMenuButton.setLookAndFeel(presetMenuButtonLookAndFeel.get());
lowShelf.setToggleState(true, juce::dontSendNotification);
highShelf.setToggleState(true, juce::dontSendNotification);
for (auto* b : {&peak1BypassButton, &peak2BypassButton, &peak3BypassButton, &crystalizeButton, &masterBypassButton}) {
b->onClick = [this, b]() {
juce::String paramID; // nimm juce::String statt std::string
@ -390,7 +378,16 @@ void CrystalizerEQAudioProcessorEditor::addComponentsToLayout() {
{
filterArea.addAndMakeVisible(lowFilterArea);
lowBandModeBox.addAndMakeVisible(lowBypass);
lowBandModeBox.addAndMakeVisible(lowCut);
lowBandModeBox.addAndMakeVisible(lowBell);
lowBandModeBox.addAndMakeVisible(lowShelf);
lowFilterArea.addAndMakeVisible(lowBandModeBox);
lowBandModeButtons.add(&lowBypass, &lowCut, &lowBell, &lowShelf);
lowBandBools = {false, false, false, true};
lowFilterArea.addAndMakeVisible(lowBandSlopeLabel);
lowFilterArea.addAndMakeVisible(lowBandGainLabel);
lowFilterArea.addAndMakeVisible(lowBandQLabel);
@ -436,7 +433,15 @@ void CrystalizerEQAudioProcessorEditor::addComponentsToLayout() {
{
filterArea.addAndMakeVisible(highFilterArea);
highBandModeBox.addAndMakeVisible(highBypass);
highBandModeBox.addAndMakeVisible(highCut);
highBandModeBox.addAndMakeVisible(highBell);
highBandModeBox.addAndMakeVisible(highShelf);
highFilterArea.addAndMakeVisible(highBandModeBox);
highBandModeButtons.add(&highBypass, &highCut, &highBell, &highShelf);
highBandBools = {false, false, false, true};
highFilterArea.addAndMakeVisible(highBandSlopeLabel);
highFilterArea.addAndMakeVisible(highBandGainLabel);
highFilterArea.addAndMakeVisible(highBandQLabel);
@ -527,6 +532,72 @@ void CrystalizerEQAudioProcessorEditor::setupSliderTextBoxes() {
}
//endregion setupSliderTextBoxes
//region handleLowBandModes
void CrystalizerEQAudioProcessorEditor::handleLowBandModes() {
for (int i = 0; i < lowBandModeButtons.size(); ++i)
{
lowBandModeButtons[i]->onClick = [this, i]
{
if (!lowBandBools[i])
{
if (auto* param = audioProcessor.apvts.getParameter("LowBandModes"))
{
param->beginChangeGesture();
for (int j = 0; j < lowBandBools.size(); ++j)
{
if (j != i)
{
lowBandBools[j] = false;
param->setValueNotifyingHost(param->convertTo0to1(0.0f));
lowBandModeButtons[j]->setToggleState(false, juce::dontSendNotification);
}
}
// Aktuellen aktivieren
lowBandBools[i] = true;
param->setValueNotifyingHost(param->convertTo0to1((float)i));
param->endChangeGesture();
}
}
};
}
}
//endregion handleLowBandModes
//region handleHighBandModes
void CrystalizerEQAudioProcessorEditor::handleHighBandModes() {
for (int i = 0; i < highBandModeButtons.size(); ++i)
{
highBandModeButtons[i]->onClick = [this, i]
{
if (!highBandBools[i])
{
if (auto* param = audioProcessor.apvts.getParameter("HighBandModes"))
{
param->beginChangeGesture();
for (int j = 0; j < highBandBools.size(); ++j)
{
if (j != i)
{
highBandBools[j] = false;
param->setValueNotifyingHost(param->convertTo0to1(0.0f));
highBandModeButtons[j]->setToggleState(false, juce::dontSendNotification);
}
}
highBandBools[i] = true;
param->setValueNotifyingHost(param->convertTo0to1((float)i));
param->endChangeGesture();
}
}
};
}
}
//endregion handleHighBandModes
//region setupEventListeners
void CrystalizerEQAudioProcessorEditor::setupEventListeners() {
presetMenuButton.onClick = [this]() {
@ -590,6 +661,9 @@ void CrystalizerEQAudioProcessorEditor::setupEventListeners() {
presetBox.setSelectedId(1, juce::dontSendNotification);
};
handleLowBandModes();
handleHighBandModes();
@ -622,7 +696,6 @@ CrystalizerEQAudioProcessorEditor::CrystalizerEQAudioProcessorEditor (Crystalize
startTimerHz(60);
addComponentsToLayout();
setupLabels();
setupModeBoxes();
setupFontsWithColours();
setupAttachments();
@ -1009,6 +1082,16 @@ void CrystalizerEQAudioProcessorEditor::resetAllCheckboxes() {
peak1BypassButton.setToggleState(false, notify);
peak2BypassButton.setToggleState(false, notify);
peak3BypassButton.setToggleState(false, notify);
lowBypass.setToggleState(false, notify);
lowCut.setToggleState(false, notify);
lowBell.setToggleState(false, notify);
lowShelf.setToggleState(true, notify);
highBypass.setToggleState(false, notify);
highCut.setToggleState(false, notify);
highBell.setToggleState(false, notify);
highShelf.setToggleState(true, notify);
}
//endregion resetAllCheckboxes
@ -1186,8 +1269,6 @@ void CrystalizerEQAudioProcessorEditor::setupLowBandLayout() {
};
Layout::grid(bounds, lowBandSpec, {
Layout::area(lowBandFreqSlider, 2, 1, 3, 2)
.withWidth(refW * freqMod * 0.8f)
.withHeight(refH * freqMod * 0.8f)
@ -1212,8 +1293,7 @@ void CrystalizerEQAudioProcessorEditor::setupLowBandLayout() {
.withAlignSelf(juce::GridItem::AlignSelf::center)
.withJustifySelf(juce::GridItem::JustifySelf::center),
Layout::area(lowBandModeBox, 3, 1, 4, 2),
Layout::area(lowBandModeBox, 3, 1, 4, 3),
Layout::area(lowBandFreqLabel, 2, 1, 3, 2)
@ -1226,6 +1306,26 @@ void CrystalizerEQAudioProcessorEditor::setupLowBandLayout() {
});
const auto modeBoxBounds = lowBandModeBox.getLocalBounds();
const auto modeBoxAreaWidth = static_cast<float>(modeBoxBounds.getWidth());
const auto modeBoxAreaHeight = static_cast<float>(modeBoxBounds.getHeight());
const auto modeBoxButtonColWidth = modeBoxAreaWidth / 4.0f;
Layout::GridSpec lowBandModeBoxSpec{
/* cols */ { Layout::fr(1), Layout::pxTrack(modeBoxButtonColWidth), Layout::pxTrack(modeBoxButtonColWidth), Layout::fr(1) },
/* rows */ { Layout::fr(1)},
/* colGap */ Spacing::SizeMode::XS,
/* rowGap */ Spacing::SizeMode::XS,
/* pad */ Layout::padding(Spacing::SizeMode::XS)
};
Layout::grid(modeBoxBounds, lowBandModeBoxSpec, {
Layout::area(lowBypass, 1, 1, 2, 2),
Layout::area(lowCut, 1, 2, 2, 3),
Layout::area(lowBell, 1, 3, 2, 4),
Layout::area(lowShelf, 1, 4, 2, 5)
});
}
//endregion setupLowBandLayout
@ -1418,7 +1518,7 @@ void CrystalizerEQAudioProcessorEditor::setupHighBandLayout() {
.withAlignSelf(juce::GridItem::AlignSelf::center)
.withJustifySelf(juce::GridItem::JustifySelf::center),
Layout::area(highBandModeBox, 3, 3, 4, 4),
Layout::area(highBandModeBox, 3, 2, 4, 4),
Layout::area(highBandSlopeSlider, 3, 1, 4, 2)
@ -1436,6 +1536,26 @@ void CrystalizerEQAudioProcessorEditor::setupHighBandLayout() {
.withMargin(juce::GridItem::Margin(-offSetToGainTop / 2, 0, 0, 0)),
});
const auto modeBoxBounds = lowBandModeBox.getLocalBounds();
const auto modeBoxAreaWidth = static_cast<float>(modeBoxBounds.getWidth());
const auto modeBoxAreaHeight = static_cast<float>(modeBoxBounds.getHeight());
const auto modeBoxButtonColWidth = modeBoxAreaWidth / 4.0f;
Layout::GridSpec highBandModeBoxSpec{
/* cols */ { Layout::fr(1), Layout::pxTrack(modeBoxButtonColWidth), Layout::pxTrack(modeBoxButtonColWidth), Layout::fr(1) },
/* rows */ { Layout::fr(1)},
/* colGap */ Spacing::SizeMode::XS,
/* rowGap */ Spacing::SizeMode::XS,
/* pad */ Layout::padding(Spacing::SizeMode::XS)
};
Layout::grid(modeBoxBounds, highBandModeBoxSpec, {
Layout::area(highBypass, 1, 1, 2, 2),
Layout::area(highCut, 1, 2, 2, 3),
Layout::area(highBell, 1, 3, 2, 4),
Layout::area(highShelf, 1, 4, 2, 5)
});
}
//endregion setupHighBandLayout

View File

@ -197,9 +197,17 @@ public:
juce::ToggleButton masterBypassButton, crystalizeButton, peak1BypassButton, peak2BypassButton, peak3BypassButton, presetMenuButton;
juce::ComboBox lowBandModeBox, highBandModeBox, presetBox;
juce::ComboBox presetBox;
std::unique_ptr<ComboBoxAttach> lowBandModeAttach, highBandModeAttach;
juce::Component lowBandModeBox, highBandModeBox;
juce::Array<juce::ToggleButton*> lowBandModeButtons, highBandModeButtons;
std::array<bool, 4> lowBandBools, highBandBools;
juce::ToggleButton lowBypass, lowCut, lowBell, lowShelf,
highBypass, highCut, highBell, highShelf;
juce::TextEditor presetNameInput;
@ -217,12 +225,14 @@ private:
void animateCrystalizeButton();
void setupModeBoxes();
void setupSliders();
void setupSliderTextBoxes();
void handleLowBandModes();
void handleHighBandModes();
void setupAttachments();
void setupDisplayNames();

View File

@ -37,7 +37,7 @@ CrystalizerEQAudioProcessor::createParameterLayout() {
"LowBandModes", // Parameter-ID
"Low Band Modes", // Anzeigename
juce::StringArray { "Off", "Cut", "Shelf", "Bell" }, // Einträge
0));
2));
//PEAK 1
@ -108,7 +108,7 @@ CrystalizerEQAudioProcessor::createParameterLayout() {
"HighBandModes", // Parameter-ID
"High Band Modes", // Anzeigename
juce::StringArray { "Off", "Cut", "Shelf", "Bell" }, // Einträge
0));
2));
//