From 4301f39a9eb51f2fd694df76f5a5627bf723c82e Mon Sep 17 00:00:00 2001 From: Daniel Hammer Date: Mon, 6 Jul 2026 21:24:27 +0200 Subject: [PATCH] fix: grey out the charmap Copy button while showing "Copied" Render the button in its disabled state during the post-copy confirmation window, matching the Bluetooth app's greyed-out "Scanning..." button. Co-Authored-By: Claude Opus 4.8 --- programs/src/charmap/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/src/charmap/main.cpp b/programs/src/charmap/main.cpp index 9973a04..53ca77e 100644 --- a/programs/src/charmap/main.cpp +++ b/programs/src/charmap/main.cpp @@ -421,9 +421,10 @@ static void render(Canvas& c) { meta, g_theme.text_subtle, META_SIZE); // Copy button — canonical MTK primary button, like other Montauk apps. - // Its label flips to "Copied" for a moment after a copy as confirmation. + // After a copy it flips to a greyed-out "Copied" for a moment (the disabled + // state, matching the Bluetooth app's "Scanning..." button) as confirmation. bool just_copied = g_copied_until && montauk::get_milliseconds() < g_copied_until; - mtk::WidgetState copy_state = mtk::widget_state(false, g_copy_hover, true); + mtk::WidgetState copy_state = mtk::widget_state(false, g_copy_hover, !just_copied); mtk::draw_button(c, L.copy_btn, just_copied ? "Copied" : "Copy", mtk::BUTTON_PRIMARY, copy_state, g_theme); }