Fix rendering of very small buttons
commit795c6f7b779ddac9723aac9b29e7b592606c8fd7
authorJiri Svoboda <jiri@wiwaxia>
Wed, 30 Nov 2022 18:43:58 +0000 (30 19:43 +0100)
committerJiri Svoboda <jiri@wiwaxia>
Thu, 1 Dec 2022 14:44:00 +0000 (1 15:44 +0100)
tree46a8feda8c2c261b56e94a13497f90a66982b223
parentc4a532808937c922172db7bb84d8491f7ec90f07
Fix rendering of very small buttons

In text mode we have some narrow buttons (scrollbar, close button etc.)
where if we subtract shadow width and padding with we arrive at negative
width. Trying to format the text to negative width causes trouble.
While somewhat hackish, we allow at least one character to be printed
even for very small buttons.

This fixes e.g. Navigator not starting.
uspace/lib/ui/src/pbutton.c