Fix sassy scope for light mode, tweak text edit colors
This commit is contained in:
parent
677b7b8c92
commit
f5ff42b8d6
4 changed files with 17 additions and 11 deletions
|
@ -2038,11 +2038,11 @@ const TextEditor::Palette & TextEditor::GetDarkPalette()
|
|||
const TextEditor::Palette & TextEditor::GetLightPalette()
|
||||
{
|
||||
const static Palette p = { {
|
||||
0xff7f7f7f, // None
|
||||
0xff000000, // None
|
||||
0xffff0c06, // Keyword
|
||||
0xff008000, // Number
|
||||
0xff2020a0, // String
|
||||
0xff304070, // Char literal
|
||||
0xff000000, // Char literal
|
||||
0xff000000, // Punctuation
|
||||
0xff406060, // Preprocessor
|
||||
0xff404040, // Identifier
|
||||
|
|
|
@ -284,7 +284,9 @@ struct SassyScopeWidget : ImGuiWidget {
|
|||
ImGui::SetNextWindowPos(ImVec2(0, 0));
|
||||
ImGui::SetNextWindowSize(ImVec2(box.size.x * scaleFactor, box.size.y * scaleFactor));
|
||||
|
||||
do_show_scope_window(module != nullptr ? &module->scope : getFakeScopeInstance(), scaleFactor);
|
||||
ScopeData* const scope = module != nullptr ? &module->scope : getFakeScopeInstance();
|
||||
scope->darkMode = settings::darkMode;
|
||||
do_show_scope_window(scope, scaleFactor);
|
||||
}
|
||||
|
||||
void onButton(const ButtonEvent& e) override
|
||||
|
|
|
@ -59,6 +59,7 @@ struct ScopeData {
|
|||
int mDisplay = 0;
|
||||
int mFFTZoom = 0;
|
||||
int mPot = 0;
|
||||
bool darkMode = true;
|
||||
float fft1[65536 * 2];
|
||||
float fft2[65536 * 2];
|
||||
float ffta[65536 * 2];
|
||||
|
|
|
@ -759,11 +759,13 @@ void do_show_scope_window(ScopeData* gScope, const float uiScale)
|
|||
}
|
||||
else
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, 0xff7f7f7f);
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, 0xff7f7f7f);
|
||||
const ImU32 bgCol = gScope->darkMode ? 0xff3f3f3f : 0xffc0c0c0;
|
||||
const ImU32 sliderCol = gScope->darkMode ? 0xff7f7f7f : 0xff808080;
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, bgCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgActive, bgCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, bgCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrab, sliderCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, sliderCol);
|
||||
ImGui::SetNextItemWidth(grid_size * uiScale);
|
||||
float x = gScope->mScroll;
|
||||
ImGui::SliderFloat("###scroll", &x, -10.0f, 0.0f, "%.3f s");
|
||||
|
@ -810,12 +812,13 @@ void do_show_scope_window(ScopeData* gScope, const float uiScale)
|
|||
|
||||
if (gScope->mMode == 0)
|
||||
{
|
||||
const ImU32 bgCol = gScope->darkMode ? 0xff3f3f3f : 0xffc0c0c0;
|
||||
if (ImGui::Button("Pause", ImVec2(80 * uiScale, 20 * uiScale)))
|
||||
gScope->mMode = 1;
|
||||
ImGui::Text("Nudge (ms)");
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, 0xff3f3f3f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, bgCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, bgCol);
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, bgCol);
|
||||
ImGui::Button("-0.1", ImVec2(38 * uiScale, 20 * uiScale));
|
||||
ImGui::SameLine();
|
||||
ImGui::Button("+0.1", ImVec2(38 * uiScale, 20 * uiScale));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue