Skip to content

Commit

Permalink
Renamed caption preferences to ensure all users start with default va…
Browse files Browse the repository at this point in the history
…lues since we've changed their functionality
  • Loading branch information
azonenberg committed Dec 1, 2023
1 parent 23f7a7f commit 252ddc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ngscopeclient/FilterGraphEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/ngscopeclient/PreferenceSchema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 252ddc2

Please sign in to comment.