From e539fa82f7fa2207189190bd34a4f4b41d814d93 Mon Sep 17 00:00:00 2001 From: BenTalagan Date: Wed, 19 Nov 2025 13:05:14 +0100 Subject: [PATCH] Update ReaImGui Markdown v0.1.8 > v0.1.9 --- Development/talagan_ReaImGui Markdown.lua | 11 +++-------- .../talagan_ReaImGui Markdown/reaimgui_markdown.lua | 6 +++--- .../reaimgui_markdown/markdown-imgui.lua | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Development/talagan_ReaImGui Markdown.lua b/Development/talagan_ReaImGui Markdown.lua index b77fe6a45..0b9db274b 100644 --- a/Development/talagan_ReaImGui Markdown.lua +++ b/Development/talagan_ReaImGui Markdown.lua @@ -1,19 +1,14 @@ --[[ @description ReaImGui Markdown : A Markdown rendering library for ReaImGui -@version 0.1.8 +@version 0.1.9 @author Ben 'Talagan' Babut @license MIT @donation https://www.paypal.com/donate/?business=3YEZMY9D6U8NC&no_recurring=1¤cy_code=EUR @links Forum Thread https://forum.cockos.com/showthread.php?t=301055 @changelog - - [Feature] Added support for "action" links - - [Feature] Added support for "time seek" links - - [Bug Fix] Align all elements to frame padding - - [Bug Fix] Adapt checkbox size to context - - [Bug Fix] Adapt font size hierarchically - - [Bug Fix] Fixing line spacings for various elements - - [Rework] Reworked cascading style system + - [Cosmetics] Realigned checkboxes vertically + - [Hotfix] ImGui context switching not handled properly @metapackage @provides [nomain] talagan_ReaImGui Markdown/reaimgui_markdown/**/*.lua diff --git a/Development/talagan_ReaImGui Markdown/reaimgui_markdown.lua b/Development/talagan_ReaImGui Markdown/reaimgui_markdown.lua index 06c9ec9af..52fd55bb9 100644 --- a/Development/talagan_ReaImGui Markdown/reaimgui_markdown.lua +++ b/Development/talagan_ReaImGui Markdown/reaimgui_markdown.lua @@ -76,10 +76,10 @@ end function ReaImGuiMd:_createFontsIfNeeded(ctx) - self.font_ctx = nil - - if self.fonts and self.ctx == self.font_ctx then return end + -- If already initialized in the same context, be happy + if self.fonts and ctx == self.font_ctx then return end + -- Else recreate all fonts in the new context local fonts = {} local style = self.style diff --git a/Development/talagan_ReaImGui Markdown/reaimgui_markdown/markdown-imgui.lua b/Development/talagan_ReaImGui Markdown/reaimgui_markdown/markdown-imgui.lua index ed4e5190d..b731678a6 100644 --- a/Development/talagan_ReaImGui Markdown/reaimgui_markdown/markdown-imgui.lua +++ b/Development/talagan_ReaImGui Markdown/reaimgui_markdown/markdown-imgui.lua @@ -851,7 +851,7 @@ local function ASTToImgui(ctx, ast, fonts, style, options) local frameheight = ImGui.GetFrameHeight(ctx) push_style(node) ImGui.PushFont(ctx, node.style.font, node.style.font_size * 0.6) - local frameheight2 = ImGui.GetFrameHeight(ctx) - 3 + local frameheight2 = ImGui.GetFrameHeight(ctx) ImGui.SetCursorPosY(ctx, ImGui.GetCursorPosY(ctx) + (frameheight - frameheight2) * 0.5) local b,v = ImGui.Checkbox(ctx, "##checkbox_" .. node.rand, node.attributes.checked) ImGui.PopFont(ctx)