From b948491fb371b5da3279ad1bd2cc2eb1c084f9ed Mon Sep 17 00:00:00 2001 From: Burer Date: Tue, 22 Apr 2025 15:01:29 +0200 Subject: [PATCH] Calc+: Fix list buttons UI (#220) - Fixed list buttons wrong position and size; - Fixed list buttons logic not working. Reviewed-on: https://git.kolibrios.org/KolibriOS/kolibrios/pulls/220 Reviewed-by: Max Logaev Co-authored-by: Burer Co-committed-by: Burer --- programs/other/calcplus/calcplus.asm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/programs/other/calcplus/calcplus.asm b/programs/other/calcplus/calcplus.asm index eedb40637..87e6652f9 100644 --- a/programs/other/calcplus/calcplus.asm +++ b/programs/other/calcplus/calcplus.asm @@ -206,6 +206,12 @@ ev_button: add ebx, 482 stdcall str_len, ebx + ; skip first (space) character + test eax, eax + jz .redraw + dec eax + inc ebx + mov edx, exp add edx, [edb1.size] add edx, eax @@ -559,9 +565,9 @@ proc draw_list ; BUTTONS mov eax, SF_DEFINE_BUTTON - mov ebx, LIST_X shl 16 + LIST_ITEM_W - mov ecx, 43 shl 16 + LIST_ITEM_H - mov edx, 60 + BT_HIDE + mov ebx, LIST_X shl 16 + (LIST_ITEM_W - 1) + mov ecx, LIST_Y shl 16 + LIST_ITEM_H + mov edx, 0x60 + BT_HIDE mov edi, LIST_ITEM_COUNT @@: