Avoid overwriting item display mode fallback
This commit is contained in:
@@ -300,9 +300,10 @@ public partial class MainWindow : Window
|
|||||||
: ArgumentsBox.Text.Trim();
|
: ArgumentsBox.Text.Trim();
|
||||||
EnsureAutomaticIconPath();
|
EnsureAutomaticIconPath();
|
||||||
selectedItem.IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim();
|
selectedItem.IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim();
|
||||||
selectedItem.DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode itemMode
|
if (ItemDisplayModeBox.SelectedItem is LauncherDisplayMode itemMode)
|
||||||
? itemMode
|
{
|
||||||
: controller?.Config.DisplayMode ?? LauncherDisplayMode.LargeIconWithText;
|
selectedItem.DisplayMode = itemMode;
|
||||||
|
}
|
||||||
|
|
||||||
if (selectedItem.Type != LauncherItemType.Menu)
|
if (selectedItem.Type != LauncherItemType.Menu)
|
||||||
{
|
{
|
||||||
@@ -322,7 +323,7 @@ public partial class MainWindow : Window
|
|||||||
: HotkeyService.Normalize(HotkeyBox.Text.Trim());
|
: HotkeyService.Normalize(HotkeyBox.Text.Trim());
|
||||||
controller.Config.DisplayMode = DisplayModeBox.SelectedItem is LauncherDisplayMode mode
|
controller.Config.DisplayMode = DisplayModeBox.SelectedItem is LauncherDisplayMode mode
|
||||||
? mode
|
? mode
|
||||||
: LauncherDisplayMode.LargeIconWithText;
|
: LauncherDisplayMode.CompactList;
|
||||||
ApplyCurrentItem();
|
ApplyCurrentItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1083,7 +1084,9 @@ public partial class MainWindow : Window
|
|||||||
Target = TargetBox.Text.Trim(),
|
Target = TargetBox.Text.Trim(),
|
||||||
Arguments = string.IsNullOrWhiteSpace(ArgumentsBox.Text) ? null : ArgumentsBox.Text.Trim(),
|
Arguments = string.IsNullOrWhiteSpace(ArgumentsBox.Text) ? null : ArgumentsBox.Text.Trim(),
|
||||||
IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim(),
|
IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim(),
|
||||||
DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode mode ? mode : LauncherDisplayMode.CompactList
|
DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode mode
|
||||||
|
? mode
|
||||||
|
: selectedItem.DisplayMode
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user