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 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 21:24:27 +02:00
parent 8eadf19e97
commit 4301f39a9e
+3 -2
View File
@@ -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);
}