mirror of
https://github.com/microsoft/terminal.git
synced 2026-11-16 09:10:27 +00:00
Allow users to disable the new resize indicator (#20861)
Adds a `showResizeOverlay` setting so the size overlay shown
while resizing can be turned off. It's on by default, and there's a
toggle for it on the Interaction page in the settings UI.
Closes #20694
(cherry picked from commit 09beddc623)
Service-Card-Id: PVTI_lADOAF3p4s4BlIihzhEVwQ8
Service-Version: 1.26
This commit is contained in:
@@ -2680,6 +2680,11 @@
|
||||
"description": "When set to true, the window will snap to the nearest character boundary on resize. When false, the window will resize smoothly",
|
||||
"type": "boolean"
|
||||
},
|
||||
"showResizeOverlay": {
|
||||
"default": true,
|
||||
"description": "When set to true, the terminal shows its size (columns × rows) in an overlay while it is being resized. When false, the overlay is never shown.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"tabWidthMode": {
|
||||
"default": "equal",
|
||||
"description": "Sets the width of the tabs. Possible values include:\n -\"equal\" sizes each tab to the same width\n -\"titleLength\" sizes each tab to the length of its title\n -\"compact\" sizes each tab to the length of its title when focused, and shrinks to the size of only the icon when the tab is unfocused.",
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace Microsoft.Terminal.Control
|
||||
Boolean CopyOnSelect { get; };
|
||||
Microsoft.Terminal.Control.CopyFormat CopyFormatting { get; };
|
||||
Boolean FocusFollowMouse { get; };
|
||||
Boolean ShowResizeOverlay { get; };
|
||||
Boolean ScrollToZoom { get; };
|
||||
Boolean ScrollToChangeOpacity { get; };
|
||||
|
||||
|
||||
@@ -2509,6 +2509,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_core->Settings().ShowResizeOverlay())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ResizeOverlayText().Text(fmt::format(FMT_COMPILE(L"{} \u00D7 {}"), size.Width, size.Height));
|
||||
ResizeOverlay().Visibility(Visibility::Visible);
|
||||
|
||||
|
||||
@@ -389,6 +389,7 @@ namespace winrt::Microsoft::Terminal::Settings
|
||||
_CopyOnSelect = windowSettings.CopyOnSelect();
|
||||
_CopyFormatting = windowSettings.CopyFormatting();
|
||||
_FocusFollowMouse = windowSettings.FocusFollowMouse();
|
||||
_ShowResizeOverlay = windowSettings.ShowResizeOverlay();
|
||||
_ScrollToZoom = windowSettings.ScrollToZoom();
|
||||
_ScrollToChangeOpacity = windowSettings.ScrollToChangeOpacity();
|
||||
_GraphicsAPI = windowSettings.GraphicsAPI();
|
||||
|
||||
@@ -139,6 +139,16 @@
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Show resize overlay -->
|
||||
<local:SettingsCard x:Name="ShowResizeOverlay"
|
||||
x:Uid="Globals_ShowResizeOverlay">
|
||||
<local:SettingsCard.HeaderIcon>
|
||||
<FontIcon Glyph="" />
|
||||
</local:SettingsCard.HeaderIcon>
|
||||
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowResizeOverlay, Mode=TwoWay}"
|
||||
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
|
||||
</local:SettingsCard>
|
||||
|
||||
<!-- Tab Switcher Mode -->
|
||||
<local:SettingsCard x:Name="TabSwitcherMode"
|
||||
x:Uid="Globals_TabSwitcherMode">
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, TrimBlockSelection);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, TrimPaste);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, SnapToGridOnResize);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, ShowResizeOverlay);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, FocusFollowMouse);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, ScrollToZoom);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(_WindowSettings, ScrollToChangeOpacity);
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace Microsoft.Terminal.Settings.Editor
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, TrimBlockSelection);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, TrimPaste);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, SnapToGridOnResize);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ShowResizeOverlay);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, FocusFollowMouse);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ScrollToZoom);
|
||||
PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ScrollToChangeOpacity);
|
||||
|
||||
@@ -2258,6 +2258,10 @@
|
||||
<value>If enabled, the terminal will be hidden as soon as you switch to another window.</value>
|
||||
<comment>A description for what the "Automatically hide window" setting does.</comment>
|
||||
</data>
|
||||
<data name="Globals_ShowResizeOverlay.Header" xml:space="preserve">
|
||||
<value>Show terminal size when resizing</value>
|
||||
<comment>Header for a control to toggle whether the terminal shows its size (columns × rows) while it is being resized.</comment>
|
||||
</data>
|
||||
<data name="ColorScheme_DefaultTag.Text" xml:space="preserve">
|
||||
<value>default</value>
|
||||
<comment>Text label displayed adjacent to a "color scheme" entry signifying that it is currently set as the default color scheme to be used.</comment>
|
||||
|
||||
@@ -115,6 +115,7 @@ namespace Microsoft.Terminal.Settings.Model
|
||||
INHERITABLE_SETTING(Microsoft.Terminal.Control.DefaultInputScope, DefaultInputScope);
|
||||
INHERITABLE_SETTING(LaunchMode, LaunchMode);
|
||||
INHERITABLE_SETTING(Boolean, SnapToGridOnResize);
|
||||
INHERITABLE_SETTING(Boolean, ShowResizeOverlay);
|
||||
INHERITABLE_SETTING(Microsoft.Terminal.Control.GraphicsAPI, GraphicsAPI);
|
||||
INHERITABLE_SETTING(Boolean, DisablePartialInvalidation);
|
||||
INHERITABLE_SETTING(Boolean, SoftwareRendering);
|
||||
|
||||
@@ -63,6 +63,7 @@ Author(s):
|
||||
X(bool, CenterOnLaunch, "centerOnLaunch", false) \
|
||||
X(Model::LaunchMode, LaunchMode, "launchMode", LaunchMode::DefaultMode) \
|
||||
X(bool, SnapToGridOnResize, "snapToGridOnResize", true) \
|
||||
X(bool, ShowResizeOverlay, "showResizeOverlay", true) \
|
||||
X(bool, AlwaysOnTop, "alwaysOnTop", false) \
|
||||
X(bool, AutoHideWindow, "autoHideWindow", false) \
|
||||
X(Model::TabSwitcherMode, TabSwitcherMode, "tabSwitcherMode", Model::TabSwitcherMode::InOrder) \
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
X(winrt::hstring, WordDelimiters, DEFAULT_WORD_DELIMITERS) \
|
||||
X(bool, CopyOnSelect, false) \
|
||||
X(bool, FocusFollowMouse, false) \
|
||||
X(bool, ShowResizeOverlay, true) \
|
||||
X(bool, ScrollToZoom, true) \
|
||||
X(bool, ScrollToChangeOpacity, true) \
|
||||
X(winrt::Windows::Foundation::IReference<winrt::Microsoft::Terminal::Core::Color>, TabColor, nullptr) \
|
||||
|
||||
Reference in New Issue
Block a user