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

Support right-to-left layout on Windows #762

Merged
merged 6 commits into from
Jul 17, 2023
Merged

Support right-to-left layout on Windows #762

merged 6 commits into from
Jul 17, 2023

Conversation

abdnh
Copy link
Contributor

@abdnh abdnh commented Jul 7, 2023

What kind of change does this PR introduce?

This PR adds support for setting right-to-left layout on Windows using the WS_EX_LAYOUTRTL extended style and others. My main use for this is to make menus appear to the right in an Arabic app. I plan to add support for this to Tauri.

  • Bugfix
  • Feature
  • Docs
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Checklist

  • This PR will resolve #___
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary
  • It can be built on all targets and pass CI/CD.

Other information

@abdnh abdnh requested a review from a team as a code owner July 7, 2023 09:37
@wusyong
Copy link
Member

wusyong commented Jul 10, 2023

Let's make this platform-specific method if this is only for Windows.

@abdnh
Copy link
Contributor Author

abdnh commented Jul 10, 2023

It should be possible to implement on Linux and macOS at least. I'll need macOS support in my app in the future so I might add that too then (currently don't have the time to investigate it and want to get Windows support merged as soon as possible).

Will make it a platform-specific method and add a .changes file.

src/platform_impl/windows/window_state.rs Outdated Show resolved Hide resolved
src/platform/windows.rs Show resolved Hide resolved
@amrbashir
Copy link
Member

amrbashir commented Jul 17, 2023

Oh looks like you didn't sign your commits and I can't merge the PR unless they are signed. You need to setup commit signing, then you can sign past commit like this for example.

Seems like you also need to run cargo fmt

@abdnh
Copy link
Contributor Author

abdnh commented Jul 17, 2023

Actually signed off the first commit and then forgot to sign the rest. Should be fine now I guess.

@amrbashir amrbashir requested a review from wusyong July 17, 2023 12:55
@wusyong wusyong merged commit 4d0e186 into tauri-apps:dev Jul 17, 2023
9 checks passed
@github-actions github-actions bot mentioned this pull request Jul 15, 2023
@abdnh abdnh deleted the rtl branch July 18, 2023 06:46
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.

3 participants