diff --git a/src/gui/gui.h b/src/gui/gui.h index b9784f3f..09155f9b 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1178,6 +1178,7 @@ class FurnaceGUI { int channelStyle; int channelVolStyle; int channelFeedbackStyle; + int channelFont; int maxRecentFile; unsigned int maxUndoSteps; String mainFontPath; @@ -1299,6 +1300,7 @@ class FurnaceGUI { channelStyle(0), channelVolStyle(0), channelFeedbackStyle(1), + channelFont(1), maxRecentFile(10), maxUndoSteps(100), mainFontPath(""), diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index e6bbc72f..4fbb9997 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -523,10 +523,15 @@ void FurnaceGUI::drawPattern() { ImGui::PushStyleColor(ImGuiCol_Text,ImGui::GetColorU32(channelTextColor(i))); ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(chanHead)); if (muted) ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_CHANNEL_MUTED]); + if (settings.channelFont==0) ImGui::PushFont(mainFont); + + // TODO: appearance ImGui::Selectable(chanID,true,ImGuiSelectableFlags_NoPadWithHalfSpacing,ImVec2(0.0f,lineHeight+1.0f*dpiScale)); + if (displayTooltip && ImGui::IsItemHovered()) { ImGui::SetTooltip("%s",e->getChannelName(i)); } + if (settings.channelFont==0) ImGui::PopFont(); if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) { if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) { e->toggleSolo(i); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 1bb94652..c771f6a1 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -1343,6 +1343,15 @@ void FurnaceGUI::drawSettings() { settings.channelFeedbackStyle=3; } + ImGui::Text("Channel font:"); + + if (ImGui::RadioButton("Regular##CHFont0",settings.channelFont==0)) { + settings.channelFont=0; + } + if (ImGui::RadioButton("Monospace##CHFont1",settings.channelFont==1)) { + settings.channelFont=1; + } + ImGui::Separator(); bool insEditColorizeB=settings.insEditColorize; @@ -2282,6 +2291,7 @@ void FurnaceGUI::syncSettings() { settings.channelStyle=e->getConfInt("channelStyle",0); settings.channelVolStyle=e->getConfInt("channelVolStyle",0); settings.channelFeedbackStyle=e->getConfInt("channelFeedbackStyle",1); + settings.channelFont=e->getConfInt("channelFont",1); settings.maxRecentFile=e->getConfInt("maxRecentFile",10); clampSetting(settings.mainFontSize,2,96); @@ -2381,6 +2391,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.channelStyle,0,5); clampSetting(settings.channelVolStyle,0,3); clampSetting(settings.channelFeedbackStyle,0,3); + clampSetting(settings.channelFont,0,1); clampSetting(settings.maxRecentFile,0,30); settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys","")); @@ -2536,6 +2547,7 @@ void FurnaceGUI::commitSettings() { e->setConf("channelStyle",settings.channelStyle); e->setConf("channelVolStyle",settings.channelVolStyle); e->setConf("channelFeedbackStyle",settings.channelFeedbackStyle); + e->setConf("channelFont",settings.channelFont); e->setConf("maxRecentFile",settings.maxRecentFile); // colors