Entry: use text32 (utf32) instead of text (utf8). This simplifies text editing and other features such as text masking (password)

This commit is contained in:
dec05eba
2025-08-07 00:13:59 +02:00
parent ff00be30df
commit 67a8040e57
4 changed files with 82 additions and 101 deletions

4
TODO
View File

@@ -26,6 +26,10 @@ Have different modes. Overlay, window and side menu. Overlay can be used on x11,
Show navigation breadcrumbs for settings and deeper navigation (such as selecting a directory to save videos).
Add option to hide stream key like a password input.
This could be implemented in Entry by having a second mgl::Text field that gets updated in set_text and that is displayed instead when the entry is masked.
For caret drawing overflow check in ::draw use that text field is the entry is masked and use that text field in caret navigation.
If masking is disabled then switch to caret index in the real text by using the same utf8_index (since the text is the same length)
but recalculate byte_index from utf8_index with utf8_index_to_byte_index.
Add global setting. In that setting there should be an option to enable/disable gsr-ui from system startup (the systemd service).