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

add support of xcb input panel offset #474

Merged
merged 4 commits into from
Apr 8, 2022
Merged

Conversation

Reverier-Xu
Copy link
Contributor

Support for configuring the overall position offset of the InputPanel.

@wengxt
Copy link
Member

wengxt commented Apr 7, 2022

you should define 4 value instead of just two. (hint reuse the existing margin type)

  1. fcitx window will be flipped on screen edge, you need to consider the bottom shadow when flipped. in the future when we support RTL, the right width of shadow might be used too.
  2. fcitx window placement calculation will then need to exclude the shadow border, instead of using the raw window size.

@Reverier-Xu
Copy link
Contributor Author

But offset just moves the whole input window on the screen, do we really need to set 4 values and exclude shadow border?
Fcitx5 now have ContentMargin and BackgroundMargin to set space width around the content, shadow margins maybe duplicated.

@Reverier-Xu
Copy link
Contributor Author

Oh, I understand what you mean. When the input window is out of the screen range, it will be transferred to the top of the screen. The offset under the RTL layout needs to be reversed, so it needs 4 shadow widths. Thank you.

src/ui/classic/xcbinputwindow.cpp Outdated Show resolved Hide resolved
src/ui/classic/xcbinputwindow.cpp Outdated Show resolved Hide resolved
@Reverier-Xu Reverier-Xu requested a review from wengxt April 7, 2022 05:04
@wengxt wengxt merged commit 35018de into fcitx:master Apr 8, 2022
wengxt added a commit to fcitx/fcitx5-gtk that referenced this pull request Apr 8, 2022
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