-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Settings] Fix Quick Accent language list being cropped and not reflowing contents #45986
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -91,5 +91,26 @@ private void QuickAccent_Language_Select_Loaded(object sender, RoutedEventArgs e | |||||||||||
|
|
||||||||||||
| loadingLanguageListDontTriggerSelectionChanged = false; | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| private void LanguageSettingsCard_Loaded(object sender, RoutedEventArgs e) | ||||||||||||
| { | ||||||||||||
| UpdateLanguageListMaxWidth(sender as Control); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| private void LanguageSettingsCard_SizeChanged(object sender, SizeChangedEventArgs e) | ||||||||||||
| { | ||||||||||||
| UpdateLanguageListMaxWidth(sender as Control); | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| private void UpdateLanguageListMaxWidth(Control card) | ||||||||||||
| { | ||||||||||||
| if (card is null) | ||||||||||||
| { | ||||||||||||
| return; | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| QuickAccent_Language_Select.MaxWidth = | ||||||||||||
| card.ActualWidth - card.Padding.Left - card.Padding.Right; | ||||||||||||
|
||||||||||||
| QuickAccent_Language_Select.MaxWidth = | |
| card.ActualWidth - card.Padding.Left - card.Padding.Right; | |
| var availableWidth = card.ActualWidth - card.Padding.Left - card.Padding.Right; | |
| var minWidth = QuickAccent_Language_Select.MinWidth; | |
| QuickAccent_Language_Select.MaxWidth = global::System.Math.Max(minWidth, availableWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, @niels9001. I will add the defensive check around this to make sure it doesn't go negative.
I'm away atm, but can look at this later today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with commit f994129
Uh oh!
There was an error while loading. Please reload this page.