From 252ddc2d7e66fa9f6dd82c8767b1c9cf01d398d6 Mon Sep 17 00:00:00 2001 From: "Andrew D. Zonenberg" Date: Fri, 1 Dec 2023 15:53:04 -0800 Subject: [PATCH] Renamed caption preferences to ensure all users start with default values since we've changed their functionality --- src/ngscopeclient/FilterGraphEditor.cpp | 4 ++-- src/ngscopeclient/PreferenceSchema.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ngscopeclient/FilterGraphEditor.cpp b/src/ngscopeclient/FilterGraphEditor.cpp index 8149bc2ed..6ad36623b 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 = m_parent->GetFontPref("Appearance.Filter Graph.icon_font"); + auto textfont = m_parent->GetFontPref("Appearance.Filter Graph.icon_caption_font"); float headerheight = headerfont->FontSize * 1.5; float rounding = ax::NodeEditor::GetStyle().NodeRounding; @@ -1948,7 +1948,7 @@ void FilterGraphEditor::DoNodeForChannel(InstrumentChannel* channel, Instrument* NodeIcon(channel, pos + icondelta, iconsize, bgList); //Draw icon caption - auto textColor = prefs.GetColor("Appearance.Filter Graph.icon_color"); + auto textColor = prefs.GetColor("Appearance.Filter Graph.icon_caption_color"); ImVec2 textpos = pos + icondelta + ImVec2(0, iconsize.y + ImGui::GetStyle().ItemSpacing.y*3); diff --git a/src/ngscopeclient/PreferenceSchema.cpp b/src/ngscopeclient/PreferenceSchema.cpp index 75b6bf48b..59c3d467d 100644 --- a/src/ngscopeclient/PreferenceSchema.cpp +++ b/src/ngscopeclient/PreferenceSchema.cpp @@ -145,13 +145,13 @@ void PreferenceManager::InitializeDefaults() .Label("Invalid link color") .Description("Color indicating a potential connection path is invalid")); graph.AddPreference( - Preference::Font("icon_font", FontDescription(FindDataFile("fonts/DejaVuSans.ttf"), 13)) + Preference::Font("icon_caption_font", FontDescription(FindDataFile("fonts/DejaVuSans.ttf"), 13)) .Label("Icon font") - .Description("Font for math block icons")); + .Description("Font for icon captions")); graph.AddPreference( - Preference::Color("icon_color", ColorFromString("#ffffff")) + Preference::Color("icon_caption_color", ColorFromString("#ffffff")) .Label("Icon color") - .Description("Color for math block icons")); + .Description("Color for icon captions")); auto& general = appearance.AddCategory("General"); general.AddPreference(