Skip to content

Commit a8f3f58

Browse files
align command palette prefix > to left when visible (#8279)
Fixes the clear button to clear the typed command not clickable in the command palette. - From the primary investigation it looked like the `TextBlock` element introduced in #7935 was somehow blocking (appearing on top of) the clear button. - It was also blocking the command palette input field from being able to access which was preventing the text in the input field from being selected and the cursor would still show as `pointer` cursor instead of a `text selection` cursor - Adding `HorizontalAlignment="Left"` property to the above-mentioned `TextBlock` element fixed the issue. ## Validation Steps Performed - Created the Dev build for `x64` in Visual Studio and verified the functionality manually. Closes #8220
1 parent eb26d5e commit a8f3f58

File tree

1 file changed

+31
-30
lines changed

1 file changed

+31
-30
lines changed

src/cascadia/TerminalApp/CommandPalette.xaml

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -178,42 +178,43 @@ the MIT License. See LICENSE in the project root for license information. -->
178178
x:Name="_prefixCharacter"
179179
Margin="16,16,0,-8"
180180
FontSize="14"
181+
HorizontalAlignment="Left"
181182
Visibility="{x:Bind PrefixCharacter,
182183
Mode=OneWay,
183184
Converter={StaticResource ParentCommandVisibilityConverter}}"
184185
Text="{x:Bind PrefixCharacter, Mode=OneWay}"
185186
>
186187
</TextBlock>
187188

188-
<StackPanel Orientation="Horizontal"
189-
Padding="16, 0, 16, 4"
190-
Grid.Row="1"
191-
Visibility="{x:Bind ParentCommandName,
192-
Mode=OneWay,
193-
Converter={StaticResource ParentCommandVisibilityConverter}}">
194-
195-
<Button
196-
Background="Transparent"
197-
x:Name="_parentCommandBackButton"
198-
x:Uid="ParentCommandBackButton"
199-
Click="_moveBackButtonClicked"
200-
ClickMode="Press"
201-
VerticalAlignment="Center">
202-
<FontIcon
203-
FontSize="12"
204-
FontFamily="Segoe MDL2 Assets"
205-
Glyph="&#xE76b;">
206-
</FontIcon>
207-
</Button>
208-
209-
<TextBlock
210-
Padding="16, 0, 16, 4"
211-
x:Name="_parentCommandText"
212-
FontStyle="Italic"
213-
Grid.Row="1"
214-
Text="{x:Bind ParentCommandName, Mode=OneWay}"
215-
VerticalAlignment="Center">
216-
</TextBlock>
189+
<StackPanel Orientation="Horizontal"
190+
Padding="16, 0, 16, 4"
191+
Grid.Row="1"
192+
Visibility="{x:Bind ParentCommandName,
193+
Mode=OneWay,
194+
Converter={StaticResource ParentCommandVisibilityConverter}}">
195+
196+
<Button
197+
Background="Transparent"
198+
x:Name="_parentCommandBackButton"
199+
x:Uid="ParentCommandBackButton"
200+
Click="_moveBackButtonClicked"
201+
ClickMode="Press"
202+
VerticalAlignment="Center">
203+
<FontIcon
204+
FontSize="12"
205+
FontFamily="Segoe MDL2 Assets"
206+
Glyph="&#xE76b;">
207+
</FontIcon>
208+
</Button>
209+
210+
<TextBlock
211+
Padding="16, 0, 16, 4"
212+
x:Name="_parentCommandText"
213+
FontStyle="Italic"
214+
Grid.Row="1"
215+
Text="{x:Bind ParentCommandName, Mode=OneWay}"
216+
VerticalAlignment="Center">
217+
</TextBlock>
217218
</StackPanel>
218219

219220
<TextBlock
@@ -267,7 +268,7 @@ the MIT License. See LICENSE in the project root for license information. -->
267268
Grid.Column="1"
268269
HorizontalAlignment="Left"
269270
Text="{x:Bind HighlightedName, Mode=OneWay}"/>
270-
271+
271272
<!-- The block for the key chord is only visible
272273
when there's actual text set as the label. See
273274
CommandKeyChordVisibilityConverter for details. -->

0 commit comments

Comments
 (0)