Skip to content

Commit

Permalink
Fixed icon font color accidentally removed in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
azonenberg committed Dec 1, 2023
1 parent 81b2e84 commit f381d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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 = ImGui::GetFont();
auto textfont = m_parent->GetFontPref("Appearance.Filter Graph.icon_font");
float headerheight = headerfont->FontSize * 1.5;
float rounding = ax::NodeEditor::GetStyle().NodeRounding;

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

0 comments on commit f381d69

Please sign in to comment.