Skip to content

Commit 92ac7cf

Browse files
committed
Biger textbox in GridView, del padding
1 parent 76de3cb commit 92ac7cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Files.App/Views/LayoutModes/GridViewBrowser.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@
402402

403403
<TextBox
404404
x:Name="TileViewTextBoxItemName"
405-
Grid.Row="0"
406-
Padding="5 2 5 2"
405+
Grid.Row="0"
407406
MaxHeight="60"
408407
HorizontalAlignment="Left"
409408
BeforeTextChanging="ItemNameTextBox_BeforeTextChanging"

src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,14 @@ override public void StartRenameItem()
184184
{
185185
Popup popup = gridViewItem.FindDescendant("EditPopup") as Popup;
186186
TextBlock textBlock = gridViewItem.FindDescendant("ItemName") as TextBlock;
187+
Grid gridMain = gridViewItem.FindDescendant("GridViewBrowserListedItem") as Grid;
188+
187189
textBox = popup.Child as TextBox;
188190
textBox.Text = textBlock.Text;
189191
textBlock.Opacity = 0;
190192
popup.IsOpen = true;
191193
OldItemName = textBlock.Text;
194+
gridMain.RowDefinitions[0].Height = new GridLength(0);
192195
}
193196
else
194197
{
@@ -256,8 +259,11 @@ protected override void EndRename(TextBox textBox)
256259
{
257260
Popup? popup = gridViewItem.FindDescendant("EditPopup") as Popup;
258261
TextBlock? textBlock = gridViewItem.FindDescendant("ItemName") as TextBlock;
262+
Grid? gridMain = gridViewItem.FindDescendant("GridViewBrowserListedItem") as Grid;
263+
259264
popup!.IsOpen = false;
260265
textBlock!.Opacity = (textBlock.DataContext as ListedItem)!.Opacity;
266+
gridMain.RowDefinitions[0].Height = GridLength.Auto;
261267
}
262268
else if (FolderSettings.LayoutMode == FolderLayoutModes.TilesView)
263269
{

0 commit comments

Comments
 (0)