From f381d69e0e42f45b3cb950fdbca4dba745e5b6eb Mon Sep 17 00:00:00 2001 From: "Andrew D. Zonenberg" Date: Fri, 1 Dec 2023 15:24:25 -0800 Subject: [PATCH] Fixed icon font color accidentally removed in previous commit --- src/ngscopeclient/FilterGraphEditor.cpp | 2 +- src/ngscopeclient/PreferenceSchema.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ngscopeclient/FilterGraphEditor.cpp b/src/ngscopeclient/FilterGraphEditor.cpp index d6750b291..82433ee98 100644 --- a/src/ngscopeclient/FilterGraphEditor.cpp +++ b/src/ngscopeclient/FilterGraphEditor.cpp @@ -1766,7 +1766,7 @@ void FilterGraphEditor::DoNodeForChannel(InstrumentChannel* channel, Instrument* auto color = ColorFromString(displaycolor); auto headercolor = prefs.GetColor("Appearance.Filter Graph.header_text_color"); auto headerfont = m_parent->GetFontPref("Appearance.Filter Graph.header_font"); - auto textfont = ImGui::GetFont(); + auto textfont = m_parent->GetFontPref("Appearance.Filter Graph.icon_font"); float headerheight = headerfont->FontSize * 1.5; float rounding = ax::NodeEditor::GetStyle().NodeRounding; diff --git a/src/ngscopeclient/PreferenceSchema.cpp b/src/ngscopeclient/PreferenceSchema.cpp index a50d5700d..03ed2d2b8 100644 --- a/src/ngscopeclient/PreferenceSchema.cpp +++ b/src/ngscopeclient/PreferenceSchema.cpp @@ -144,6 +144,14 @@ void PreferenceManager::InitializeDefaults() Preference::Color("invalid_link_color", ColorFromString("#ff0000")) .Label("Invalid link color") .Description("Color indicating a potential connection path is invalid")); + graph.AddPreference( + Preference::Font("icon_font", FontDescription(FindDataFile("fonts/DejaVuSans.ttf"), 40)) + .Label("Icon font") + .Description("Font for math block icons")); + graph.AddPreference( + Preference::Color("icon_color", ColorFromString("#ffffff")) + .Label("Icon color") + .Description("Color for math block icons")); auto& general = appearance.AddCategory("General"); general.AddPreference(