Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Overlapping Hint Text in InputLine During Unicode Input #132

Closed
wants to merge 1 commit into from

Conversation

chaeya
Copy link

@chaeya chaeya commented Jun 13, 2024

This pull request addresses the issue of overlapping hint text in the InputLine class when typing using Unicode input methods. Due to the nature of Unicode input, where characters are composed of multiple keystrokes (such as Korean and other languages), the hint text was overlapping with the input text during composition.

Changes Made

Cursor Position Adjustment:

The paintEvent method has been modified to use the cursor's pixel position (cursorRect().right()) to determine the starting position for drawing the hint text. This ensures that the hint text does not overlap with the input text, even during the composition of Unicode characters.

Offset Addition:

An additional offset of 5 pixels has been added to the starting position of the hint text to further prevent any overlap and improve readability.

Screenshot of current and PR

current

albert_input_bug

after applied PR

after_fix_bug

@ManuelSchneid3r
Copy link
Member

i have a huge wbm overhaul in my working dir. i cant merge this atm. i will consider this and come back if i am working on it. currently i had to separate the overhaul which is going to take some more weeks/months from a shippable release which at least fixes recent bugs that are non negliable.

@chaeya chaeya closed this Jun 25, 2024
@chaeya chaeya deleted the main branch June 25, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants