From d62b64c27aea33023d06ef6745169e070eb7d40a Mon Sep 17 00:00:00 2001 From: paxcut <53811119+paxcut@users.noreply.github.com> Date: Tue, 2 Sep 2025 17:29:33 -0700 Subject: [PATCH] Fixes for next release. (#2430) I forgot I also had comments switched to italics done easily thanks to WerWolv's addition that lets you push and pop them. --- plugins/ui/source/ui/text_editor/render.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/ui/source/ui/text_editor/render.cpp b/plugins/ui/source/ui/text_editor/render.cpp index 549368f72..0b6d5df4f 100644 --- a/plugins/ui/source/ui/text_editor/render.cpp +++ b/plugins/ui/source/ui/text_editor/render.cpp @@ -1,4 +1,5 @@ #include "imgui.h" +#include "fonts/fonts.hpp" #include #include @@ -530,8 +531,12 @@ namespace hex::ui { auto textStart = textDistanceToLineStart(lineStart); auto begin = lineStartScreenPos + ImVec2(textStart, 0); + if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment) + fonts::CodeEditor().pushItalic(); TextUnformattedColoredAt(begin, m_palette[(i32) color], line.substr(i, tokenLength).c_str()); + if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment) + fonts::CodeEditor().pop(); ErrorMarkers::iterator errorIt; auto key = lineStart + Coordinates(1, 1); if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {