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 preedit styling in chromium #3131

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Fix preedit styling in chromium #3131

merged 1 commit into from
Sep 1, 2023

Conversation

q234rty
Copy link
Contributor

@q234rty q234rty commented Sep 1, 2023

Describe your PR, what does it fix/add?

ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_NONE seems to be ignored in chromium, causing chromium to fallback on the yellow background mentioned in #1746 (comment), which unfortunately doesn't look great under dark themes.

Change it to ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT which causes chromium to draw a thick underline under the preedit.

This PR also fixes the length of the preedit styling so the last character gets underlined as well.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Alternatives are:
ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_DEFAULT, which in chromium means no styling at all and preedit text will look like regular text, which is not great IMO.
ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_UNDERLINE, which gives a thinner underline than ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT in chromium.

Is it ready for merging, or does it need work?

Ready.

@q234rty
Copy link
Contributor Author

q234rty commented Sep 1, 2023

Before this PR:
图片
After this PR:
swappy-20230901_185454

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit 5035f5f into hyprwm:main Sep 1, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants