From 20477fd68b900687ff458e901ba52e4f3988a390 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Sun, 18 Aug 2024 14:57:13 -0400 Subject: [PATCH] Some minor cleanups mostly in the log but also a color or two i had wrong --- src-ui/components/multi/OutputPane.cpp | 1 - src-ui/components/multi/PartSidebarCard.cpp | 6 +++++- src-ui/connectors/PayloadDataAttachment.h | 2 +- src-ui/theme/ThemeApplier.cpp | 1 - src/engine/engine.cpp | 4 +++- src/engine/engine.h | 16 +--------------- src/modulation/group_matrix.h | 2 +- src/sample/sample_manager.cpp | 2 +- src/utils.h | 2 ++ 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src-ui/components/multi/OutputPane.cpp b/src-ui/components/multi/OutputPane.cpp index 039c2858..5321dc39 100644 --- a/src-ui/components/multi/OutputPane.cpp +++ b/src-ui/components/multi/OutputPane.cpp @@ -142,7 +142,6 @@ template struct ProcTab : juce::Component, HasEditor levelK[i]->setBounds(5 + i * (kw + 5), 40, kw, kw); levelK[i]->setEnabled(w->processorView.type != dsp::processor::proct_none); setupWidgetForValueTooltip(levelK[i].get(), levelA[i].get()); - SCLOG_ONCE("Fix up accessibility for this knob"); addAndMakeVisible(*levelK[i]); } } diff --git a/src-ui/components/multi/PartSidebarCard.cpp b/src-ui/components/multi/PartSidebarCard.cpp index 28ed764f..b6924d35 100644 --- a/src-ui/components/multi/PartSidebarCard.cpp +++ b/src-ui/components/multi/PartSidebarCard.cpp @@ -121,7 +121,7 @@ void PartSidebarCard::paint(juce::Graphics &g) } else { - g.setColour(editor->themeColor(theme::ColorMap::generic_content_medium)); + g.setColour(editor->themeColor(theme::ColorMap::accent_1a).withAlpha(0.3f)); } if (selfAccent) { @@ -129,6 +129,10 @@ void PartSidebarCard::paint(juce::Graphics &g) g.drawRoundedRectangle(rb.toFloat(), 2, 1); } + if (editor->getSelectedPart() != part) + { + g.setColour(editor->themeColor(theme::ColorMap::generic_content_medium)); + } auto r = juce::Rectangle(5, row0 + rowMargin, 18, rowHeight - 2 * rowMargin); g.setFont(editor->themeApplier.interMediumFor(12)); g.drawText(std::to_string(part + 1), r, juce::Justification::centred); diff --git a/src-ui/connectors/PayloadDataAttachment.h b/src-ui/connectors/PayloadDataAttachment.h index d2f8ef0f..0a0f46d5 100644 --- a/src-ui/connectors/PayloadDataAttachment.h +++ b/src-ui/connectors/PayloadDataAttachment.h @@ -607,7 +607,7 @@ std::unique_ptr makeConnectedToDummy(uint32_t index, const std::string &lab, t = t << 8; } - SCLOG("Incomplete UI bound to dummy source '" << s << "'"); + // SCLOG("Incomplete UI bound to dummy source '" << s << "'"); } res->setSource(thisWillLeak); diff --git a/src-ui/theme/ThemeApplier.cpp b/src-ui/theme/ThemeApplier.cpp index acb6d8f6..a5b05d97 100644 --- a/src-ui/theme/ThemeApplier.cpp +++ b/src-ui/theme/ThemeApplier.cpp @@ -155,7 +155,6 @@ ThemeApplier::ThemeApplier() static bool detailInitialized{false}; if (!detailInitialized) { - SCLOG("Initializing All Theme Stylesheets"); detail::multi::init(); detail::multi::zone::init(); detail::multi::group::init(); diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index dd7fc770..a58ab6bd 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -59,7 +59,9 @@ namespace scxt::engine Engine::Engine() { - SCLOG("Shortcircuit XT : Constructing Engine - Version " << scxt::build::FullVersionStr); + SCLOG("Shortcircuit XT : Constructing Engine"); + SCLOG(" Version = " << scxt::build::FullVersionStr); + SCLOG(" Stream V = " << humanReadableVersion(scxt::currentStreamingVersion)); id.id = rng.unifU32() % 1024; diff --git a/src/engine/engine.h b/src/engine/engine.h index 571c7797..f42aca7d 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -349,7 +349,7 @@ struct Engine : MoveableOnly, SampleRateSupport uint64_t pVer{0}; explicit UnstreamGuard(uint64_t sv) { - SCLOG("Unstreaming engine with streaming version = " << scxt::humanReadableVersion(sv)); + SCLOG("Unstreaming engine::Engine. Version : " << scxt::humanReadableVersion(sv)); pIs = engine::Engine::isFullEngineUnstream; pVer = engine::Engine::fullEngineUnstreamStreamingVersion; engine::Engine::isFullEngineUnstream = true; @@ -366,20 +366,6 @@ struct Engine : MoveableOnly, SampleRateSupport StreamReason pIs{IN_PROCESS}; explicit StreamGuard(StreamReason sr) { - switch (sr) - { - case IN_PROCESS: - SCLOG("Engine Stream Guard - In Process"); - break; - - case FOR_DAW: - SCLOG("Engine Stream Guard - For DAW"); - break; - - case FOR_MULTI: - SCLOG("Engine Stream Guard - For Multi"); - break; - } pIs = engine::Engine::streamReason; engine::Engine::streamReason = sr; } diff --git a/src/modulation/group_matrix.h b/src/modulation/group_matrix.h index 25950d8b..655a67d0 100644 --- a/src/modulation/group_matrix.h +++ b/src/modulation/group_matrix.h @@ -137,7 +137,7 @@ struct GroupMatrixEndpoints LFOTarget(engine::Engine *e, uint32_t p) : shared::LFOTargetEndpointData(p) { if (e) - SCLOG_UNIMPL("Engine Attach Group LFO"); + SCLOG_UNIMPL_ONCE("Engine Attach Group LFO"); } void bind(GroupMatrix &m, engine::Group &g); }; diff --git a/src/sample/sample_manager.cpp b/src/sample/sample_manager.cpp index f53c0ffe..c7218cad 100644 --- a/src/sample/sample_manager.cpp +++ b/src/sample/sample_manager.cpp @@ -99,7 +99,7 @@ std::optional SampleManager::loadSampleByPathToID(const fs::path &p, c } } - SCLOG("Loading sample " << p.u8string() << " into " << id.to_string()); + SCLOG("Loading [" << p.u8string() << "] @ [" << id.to_string() << "]"); auto sp = std::make_shared(id); diff --git a/src/utils.h b/src/utils.h index 60770dab..a7bd3698 100644 --- a/src/utils.h +++ b/src/utils.h @@ -293,6 +293,8 @@ std::string logTimestamp(); #define SCLOG_WFUNC(...) SCLOG(__func__ << " " << __VA_ARGS__) #define SCLOG_UNIMPL(...) SCLOG("\033[1;33mUnimpl [" << __func__ << "]\033[0m " << __VA_ARGS__); +#define SCLOG_UNIMPL_ONCE(...) \ + SCLOG_ONCE("\033[1;33mUnimpl [" << __func__ << "]\033[0m " << __VA_ARGS__); #define SCD(x) #x << "=" << (x) << " " #define DECLARE_ENUM_STRING(E) \