From 84a33afb8c4eb361c0b24d41dd2c75ba13b0587d Mon Sep 17 00:00:00 2001 From: Carlos Zamora Date: Tue, 17 Sep 2024 10:45:59 -0700 Subject: [PATCH] Fix text scaling issues in settings UI (#17910) ## Summary of the Pull Request Fixes some issues with truncated text in the settings UI when 200% text scaling is applied. For #17897, a minimum height was applied instead of a plain "height". This ensures that the desired height is applied in general, but under 200% text scaling, we are allowed to grow past that, thus preventing the truncation of the text. For #17898, flyouts have a scroll viewer inside them by default. We actually don't want the scroll viewer because that means the text will appear "truncated" when in reality, the user is expected to notice the small scrollbar and scroll horizontally (why that's the default, I will never know). This PR introduces a new style that can be applied to these flyouts to cause text wrapping instead of horizontal scrolling. Looked through the app for any instances where this happens. For #12006, simply changing the column width from a static value to "auto" fixes the issue. Frankly, we care more about the text appearing as a whole (and as whole words). The name of the actions wrap properly anyways. Closes #17897 Closes #17898 Closes #12006 (cherry picked from commit a7e47b711a2adc7b9e80eddea8168089f7d3b11e) Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgTEfj0 Service-Version: 1.21 --- src/cascadia/TerminalSettingsEditor/Actions.xaml | 4 ++-- .../TerminalSettingsEditor/ActionsViewModel.cpp | 13 +++++++++++++ .../TerminalSettingsEditor/CommonResources.xaml | 12 ++++++++++-- .../TerminalSettingsEditor/EditColorScheme.xaml | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/cascadia/TerminalSettingsEditor/Actions.xaml b/src/cascadia/TerminalSettingsEditor/Actions.xaml index 600ec4329d9..5eb09daf421 100644 --- a/src/cascadia/TerminalSettingsEditor/Actions.xaml +++ b/src/cascadia/TerminalSettingsEditor/Actions.xaml @@ -178,7 +178,7 @@ - + @@ -125,6 +125,14 @@ TargetType="TextBlock"> + + + + + @@ -145,7 +153,7 @@ BasedOn="{StaticResource BaseButtonStyle}" TargetType="Button"> - + diff --git a/src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml b/src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml index 1279123c4ef..2c2ed3de5d4 100644 --- a/src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml +++ b/src/cascadia/TerminalSettingsEditor/EditColorScheme.xaml @@ -488,7 +488,7 @@ - +