diff --git a/FluentTerminal.App.Services/ISettingsService.cs b/FluentTerminal.App.Services/ISettingsService.cs index 319c318..343c890 100644 --- a/FluentTerminal.App.Services/ISettingsService.cs +++ b/FluentTerminal.App.Services/ISettingsService.cs @@ -12,6 +12,9 @@ namespace FluentTerminal.App.Services event EventHandler ShellProfileAdded; event EventHandler ShellProfileDeleted; event EventHandler TerminalOptionsChanged; + event EventHandler ThemeDeleted; + event EventHandler ThemeAdded; + void DeleteShellProfile(Guid id); void DeleteTheme(Guid id); ApplicationSettings GetApplicationSettings(); @@ -32,6 +35,7 @@ namespace FluentTerminal.App.Services void SaveKeyBindings(string command, ICollection keyBindings); void SaveShellProfile(ShellProfile shellProfile, bool newShell = false); void SaveTerminalOptions(TerminalOptions terminalOptions); - void SaveTheme(TerminalTheme theme); + void SaveTheme(TerminalTheme theme, bool newTheme = false); + ShellProfile GetShellProfile(Guid id); } } \ No newline at end of file diff --git a/FluentTerminal.App.Services/Implementation/SettingsService.cs b/FluentTerminal.App.Services/Implementation/SettingsService.cs index ad6dc39..a51f751 100644 --- a/FluentTerminal.App.Services/Implementation/SettingsService.cs +++ b/FluentTerminal.App.Services/Implementation/SettingsService.cs @@ -49,7 +49,9 @@ namespace FluentTerminal.App.Services.Implementation public event EventHandler ApplicationSettingsChanged; + public event EventHandler ThemeAdded; public event EventHandler CurrentThemeChanged; + public event EventHandler ThemeDeleted; public event EventHandler KeyBindingsChanged; @@ -67,6 +69,17 @@ namespace FluentTerminal.App.Services.Implementation public void DeleteTheme(Guid id) { _themes.Delete(id.ToString()); + + foreach (var profile in GetShellProfiles()) + { + if (profile.TerminalThemeId == id) + { + profile.TerminalThemeId = Guid.Empty; + SaveShellProfile(profile); + } + } + + ThemeDeleted?.Invoke(this, id); } public ApplicationSettings GetApplicationSettings() @@ -217,7 +230,7 @@ namespace FluentTerminal.App.Services.Implementation TerminalOptionsChanged?.Invoke(this, terminalOptions); } - public void SaveTheme(TerminalTheme theme) + public void SaveTheme(TerminalTheme theme, bool newTheme = false) { _themes.WriteValueAsJson(theme.Id.ToString(), theme); @@ -225,6 +238,11 @@ namespace FluentTerminal.App.Services.Implementation { CurrentThemeChanged?.Invoke(this, theme.Id); } + + if (newTheme) + { + ThemeAdded?.Invoke(this, theme); + } } } } \ No newline at end of file diff --git a/FluentTerminal.App.ViewModels/MainViewModel.cs b/FluentTerminal.App.ViewModels/MainViewModel.cs index 0c149b3..99af9a9 100644 --- a/FluentTerminal.App.ViewModels/MainViewModel.cs +++ b/FluentTerminal.App.ViewModels/MainViewModel.cs @@ -43,8 +43,8 @@ namespace FluentTerminal.App.ViewModels _dispatcherTimer = dispatcherTimer; _clipboardService = clipboardService; _keyboardCommandService = keyboardCommandService; - _keyboardCommandService.RegisterCommandHandler(nameof(Command.NewTab), () => AddTerminal(null, false)); - _keyboardCommandService.RegisterCommandHandler(nameof(Command.ConfigurableNewTab), () => AddTerminal(null, true)); + _keyboardCommandService.RegisterCommandHandler(nameof(Command.NewTab), () => AddTerminal(null, false, Guid.Empty)); + _keyboardCommandService.RegisterCommandHandler(nameof(Command.ConfigurableNewTab), () => AddTerminal(null, true, Guid.Empty)); _keyboardCommandService.RegisterCommandHandler(nameof(Command.CloseTab), CloseCurrentTab); // Add all of the commands for switching to a tab of a given ID, if there's one open there @@ -65,7 +65,7 @@ namespace FluentTerminal.App.ViewModels foreach (ShellProfile profile in _settingsService.GetShellProfiles()) { - _keyboardCommandService.RegisterCommandHandler(profile.Id.ToString(), () => AddTerminal(profile.WorkingDirectory, false, profile)); + _keyboardCommandService.RegisterCommandHandler(profile.Id.ToString(), () => AddTerminal(profile.WorkingDirectory, false, profile.Id)); } var currentTheme = _settingsService.GetCurrentTheme(); @@ -75,7 +75,7 @@ namespace FluentTerminal.App.ViewModels _applicationSettings = _settingsService.GetApplicationSettings(); TabsPosition = _applicationSettings.TabsPosition; - AddTerminalCommand = new RelayCommand(() => AddTerminal(null, false)); + AddTerminalCommand = new RelayCommand(() => AddTerminal(null, false, Guid.Empty)); ShowAboutCommand = new RelayCommand(ShowAbout); ShowSettingsCommand = new RelayCommand(ShowSettings); @@ -90,7 +90,7 @@ namespace FluentTerminal.App.ViewModels private void OnShellProfileAdded(object sender, ShellProfile e) { - _keyboardCommandService.RegisterCommandHandler(e.Id.ToString(), () => AddTerminal(e.WorkingDirectory, false, e)); + _keyboardCommandService.RegisterCommandHandler(e.Id.ToString(), () => AddTerminal(e.WorkingDirectory, false, e.Id)); } private void OnTerminalsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) @@ -166,14 +166,13 @@ namespace FluentTerminal.App.ViewModels /// /// Add a new terminal window, either with a specified terminal profile, with the default, or by showing the profile selection dialog. /// - /// - /// - /// /// - public Task AddTerminal(string startupDirectory, bool showProfileSelection, ShellProfile profile = null) + public Task AddTerminal(string startupDirectory, bool showProfileSelection, Guid profileId) { return _applicationView.RunOnDispatcherThread(async () => { + ShellProfile profile = null; + if (showProfileSelection) { profile = await _dialogService.ShowProfileSelectionDialogAsync(); @@ -183,9 +182,12 @@ namespace FluentTerminal.App.ViewModels return; } } - else if (profile == null) + else if (profileId == Guid.Empty) { profile = _settingsService.GetDefaultShellProfile(); + } else + { + profile = _settingsService.GetShellProfile(profileId); } var terminal = new TerminalViewModel(_settingsService, _trayProcessCommunicationService, _dialogService, _keyboardCommandService, diff --git a/FluentTerminal.App.ViewModels/Settings/ProfilesPageViewModel.cs b/FluentTerminal.App.ViewModels/Settings/ProfilesPageViewModel.cs index 242d0e4..1d6c369 100644 --- a/FluentTerminal.App.ViewModels/Settings/ProfilesPageViewModel.cs +++ b/FluentTerminal.App.ViewModels/Settings/ProfilesPageViewModel.cs @@ -16,20 +16,22 @@ namespace FluentTerminal.App.ViewModels.Settings private readonly ISettingsService _settingsService; private readonly IFileSystemService _fileSystemService; private ShellProfileViewModel _selectedShellProfile; + private readonly IApplicationView _applicationView; - public ProfilesPageViewModel(ISettingsService settingsService, IDialogService dialogService, IDefaultValueProvider defaultValueProvider, IFileSystemService fileSystemService) + public ProfilesPageViewModel(ISettingsService settingsService, IDialogService dialogService, IDefaultValueProvider defaultValueProvider, IFileSystemService fileSystemService, IApplicationView applicationView) { _settingsService = settingsService; _dialogService = dialogService; _defaultValueProvider = defaultValueProvider; _fileSystemService = fileSystemService; + _applicationView = applicationView; CreateShellProfileCommand = new RelayCommand(CreateShellProfile); var defaultShellProfileId = _settingsService.GetDefaultShellProfileId(); foreach (var shellProfile in _settingsService.GetShellProfiles()) { - var viewModel = new ShellProfileViewModel(shellProfile, settingsService, dialogService, fileSystemService); + var viewModel = new ShellProfileViewModel(shellProfile, settingsService, dialogService, fileSystemService, _applicationView); viewModel.Deleted += OnShellProfileDeleted; viewModel.SetAsDefault += OnShellProfileSetAsDefault; @@ -41,6 +43,7 @@ namespace FluentTerminal.App.ViewModels.Settings } SelectedShellProfile = ShellProfiles.First(p => p.IsDefault); + } private void OnShellProfileSetAsDefault(object sender, EventArgs e) @@ -89,7 +92,7 @@ namespace FluentTerminal.App.ViewModels.Settings _settingsService.SaveShellProfile(shellProfile, true); - var viewModel = new ShellProfileViewModel(shellProfile, _settingsService, _dialogService, _fileSystemService); + var viewModel = new ShellProfileViewModel(shellProfile, _settingsService, _dialogService, _fileSystemService, _applicationView); viewModel.EditCommand.Execute(null); viewModel.SetAsDefault += OnShellProfileSetAsDefault; viewModel.Deleted += OnShellProfileDeleted; diff --git a/FluentTerminal.App.ViewModels/Settings/ThemesPageViewModel.cs b/FluentTerminal.App.ViewModels/Settings/ThemesPageViewModel.cs index dc5e417..92c4dc5 100644 --- a/FluentTerminal.App.ViewModels/Settings/ThemesPageViewModel.cs +++ b/FluentTerminal.App.ViewModels/Settings/ThemesPageViewModel.cs @@ -92,7 +92,7 @@ namespace FluentTerminal.App.ViewModels.Settings Colors = new TerminalColors(defaultTheme.Colors) }; - _settingsService.SaveTheme(theme); + _settingsService.SaveTheme(theme, true); var viewModel = new ThemeViewModel(theme, _settingsService, _dialogService, _fileSystemService); viewModel.Activated += OnThemeActivated; @@ -118,7 +118,7 @@ namespace FluentTerminal.App.ViewModels.Settings { var theme = await parser.Parse(file.Name, file.Content).ConfigureAwait(true); - _settingsService.SaveTheme(theme); + _settingsService.SaveTheme(theme, true); var viewModel = new ThemeViewModel(theme, _settingsService, _dialogService, _fileSystemService); viewModel.Activated += OnThemeActivated; diff --git a/FluentTerminal.App.ViewModels/SettingsViewModel.cs b/FluentTerminal.App.ViewModels/SettingsViewModel.cs index 9a063f8..d6dcf71 100644 --- a/FluentTerminal.App.ViewModels/SettingsViewModel.cs +++ b/FluentTerminal.App.ViewModels/SettingsViewModel.cs @@ -14,7 +14,7 @@ namespace FluentTerminal.App.ViewModels About = new AboutPageViewModel(settingsService, updateService, applicationView); KeyBindings = new KeyBindingsPageViewModel(settingsService, dialogService, defaultValueProvider, trayProcessCommunicationService); General = new GeneralPageViewModel(settingsService, dialogService, defaultValueProvider, startupTaskService); - Shell = new ProfilesPageViewModel(settingsService, dialogService, defaultValueProvider, fileSystemService); + Shell = new ProfilesPageViewModel(settingsService, dialogService, defaultValueProvider, fileSystemService, applicationView); Terminal = new TerminalPageViewModel(settingsService, dialogService, defaultValueProvider, systemFontService); Themes = new ThemesPageViewModel(settingsService, dialogService, defaultValueProvider, themeParserFactory, fileSystemService); Mouse = new MousePageViewModel(settingsService, dialogService, defaultValueProvider); diff --git a/FluentTerminal.App.ViewModels/ShellProfileViewModel.cs b/FluentTerminal.App.ViewModels/ShellProfileViewModel.cs index c0b0a79..d9668bc 100644 --- a/FluentTerminal.App.ViewModels/ShellProfileViewModel.cs +++ b/FluentTerminal.App.ViewModels/ShellProfileViewModel.cs @@ -16,29 +16,40 @@ namespace FluentTerminal.App.ViewModels private readonly IDialogService _dialogService; private readonly IFileSystemService _fileSystemService; private readonly ISettingsService _settingsService; - private readonly ShellProfile _shellProfile; + private ShellProfile _shellProfile; private string _arguments; - private string _fallbackArguments; - private string _fallbackLocation; - private string _fallbackName; - private int _fallbackTabThemeId; - private string _fallbackWorkingDirectory; + private ShellProfile _fallbackProfile; private bool _inEditMode; private bool _isDefault; private string _location; private string _name; private TabTheme _selectedTabTheme; + private TerminalTheme _selectedTerminalTheme; private string _workingDirectory; + private readonly IApplicationView _applicationView; - public ShellProfileViewModel(ShellProfile shellProfile, ISettingsService settingsService, IDialogService dialogService, IFileSystemService fileSystemService) + public ShellProfileViewModel(ShellProfile shellProfile, ISettingsService settingsService, IDialogService dialogService, IFileSystemService fileSystemService, IApplicationView applicationView) { _shellProfile = shellProfile; _settingsService = settingsService; _dialogService = dialogService; _fileSystemService = fileSystemService; + _applicationView = applicationView; TabThemes = new ObservableCollection(settingsService.GetTabThemes()); + TerminalThemes = new ObservableCollection(); + TerminalThemes.Add(new TerminalTheme + { + Id = Guid.Empty, + Name = "Default" + }); + foreach(var theme in _settingsService.GetThemes()) + { + TerminalThemes.Add(theme); + } + SelectedTerminalTheme = TerminalThemes.FirstOrDefault(t => t.Id == shellProfile.TerminalThemeId); + Id = shellProfile.Id; Name = shellProfile.Name; Arguments = shellProfile.Arguments; @@ -47,6 +58,9 @@ namespace FluentTerminal.App.ViewModels SelectedTabTheme = TabThemes.FirstOrDefault(t => t.Id == shellProfile.TabThemeId); PreInstalled = shellProfile.PreInstalled; + _settingsService.ThemeAdded += OnThemeAdded; + _settingsService.ThemeDeleted += OnThemeDeleted; + var keyBindings = shellProfile.KeyBindings.Select(x => new KeyBinding(x)).ToList(); KeyBindings = new KeyBindingsViewModel(shellProfile.Id.ToString(), keyBindings, _dialogService, string.Empty, false); @@ -60,6 +74,30 @@ namespace FluentTerminal.App.ViewModels BrowseForWorkingDirectoryCommand = new AsyncCommand(BrowseForWorkingDirectory); } + private void OnThemeAdded(object sender, TerminalTheme e) + { + _applicationView.RunOnDispatcherThread(() => + { + TerminalThemes.Add(e); + }); + } + + private void OnThemeDeleted(object sender, Guid e) + { + if (SelectedTerminalTheme.Id == e) + { + _applicationView.RunOnDispatcherThread(() => + { + SelectedTerminalTheme = TerminalThemes.FirstOrDefault(x => x.Id == Guid.Empty); + _shellProfile.TerminalThemeId = Guid.Empty; + if (_fallbackProfile != null) + { + _fallbackProfile.TerminalThemeId = Guid.Empty; + } + }); + } + } + public event EventHandler Deleted; public event EventHandler SetAsDefault; @@ -74,6 +112,8 @@ namespace FluentTerminal.App.ViewModels public ObservableCollection TabThemes { get; } public KeyBindingsViewModel KeyBindings { get; } + public ObservableCollection TerminalThemes { get; } + public bool PreInstalled { get; } public string Arguments @@ -120,6 +160,18 @@ namespace FluentTerminal.App.ViewModels } } + public TerminalTheme SelectedTerminalTheme + { + get => _selectedTerminalTheme; + set + { + if (value != null) + { + Set(ref _selectedTerminalTheme, value); + } + } + } + public string WorkingDirectory { get => _workingDirectory; @@ -133,6 +185,7 @@ namespace FluentTerminal.App.ViewModels _shellProfile.Name = Name; _shellProfile.WorkingDirectory = WorkingDirectory; _shellProfile.TabThemeId = SelectedTabTheme.Id; + _shellProfile.TerminalThemeId = SelectedTerminalTheme.Id; _shellProfile.KeyBindings = KeyBindings.KeyBindings.Select(x => x.Model).ToList(); _settingsService.SaveShellProfile(_shellProfile); @@ -169,11 +222,12 @@ namespace FluentTerminal.App.ViewModels if (result == DialogButton.OK) { - Arguments = _fallbackArguments; - Location = _fallbackLocation; - Name = _fallbackName; - WorkingDirectory = _fallbackWorkingDirectory; - SelectedTabTheme = TabThemes.FirstOrDefault(t => t.Id == _fallbackTabThemeId); + Arguments = _fallbackProfile.Arguments; + Location = _fallbackProfile.Location; + Name = _fallbackProfile.Name; + WorkingDirectory = _fallbackProfile.WorkingDirectory; + SelectedTerminalTheme = TerminalThemes.FirstOrDefault(t => t.Id == _fallbackProfile.TerminalThemeId); + SelectedTabTheme = TabThemes.FirstOrDefault(t => t.Id == _fallbackProfile.TabThemeId); KeyBindings.KeyBindings.Clear(); foreach (var keyBinding in _shellProfile.KeyBindings.Select(x => new KeyBinding(x)).ToList()) @@ -203,11 +257,16 @@ namespace FluentTerminal.App.ViewModels private void Edit() { - _fallbackArguments = _shellProfile.Arguments; - _fallbackLocation = _shellProfile.Location; - _fallbackName = _shellProfile.Name; - _fallbackWorkingDirectory = _shellProfile.WorkingDirectory; - _fallbackTabThemeId = _shellProfile.TabThemeId; + // todo write copy ctor + _fallbackProfile = new ShellProfile + { + Arguments = _shellProfile.Arguments, + Location = _shellProfile.Location, + Name = _shellProfile.Name, + WorkingDirectory = _shellProfile.WorkingDirectory, + TabThemeId = _shellProfile.TabThemeId, + TerminalThemeId = _shellProfile.TerminalThemeId + }; KeyBindings.Editable = true; InEditMode = true; diff --git a/FluentTerminal.App.ViewModels/TerminalViewModel.cs b/FluentTerminal.App.ViewModels/TerminalViewModel.cs index 2edf751..f433131 100644 --- a/FluentTerminal.App.ViewModels/TerminalViewModel.cs +++ b/FluentTerminal.App.ViewModels/TerminalViewModel.cs @@ -32,6 +32,7 @@ namespace FluentTerminal.App.ViewModels private bool _showResizeOverlay; private bool _showSearchPanel; private TabTheme _tabTheme; + private TerminalTheme _terminalTheme; private int _terminalId; private ITerminalView _terminalView; private string _title; @@ -62,6 +63,8 @@ namespace FluentTerminal.App.ViewModels _applicationView = applicationView; _clipboardService = clipboardService; + TerminalTheme = shellProfile.TerminalThemeId == Guid.Empty ? _settingsService.GetCurrentTheme() : _settingsService.GetTheme(shellProfile.TerminalThemeId); + TabThemes = new ObservableCollection(_settingsService.GetTabThemes()); TabTheme = TabThemes.FirstOrDefault(t => t.Id == _shellProfile.TabThemeId); @@ -89,6 +92,12 @@ namespace FluentTerminal.App.ViewModels _settingsService.GetTabThemes().FirstOrDefault(t => t.Color == null); } + public TerminalTheme TerminalTheme + { + get => _terminalTheme; + set => Set(ref _terminalTheme, value); + } + public RelayCommand CloseCommand { get; } public RelayCommand CloseSearchPanelCommand { get; } @@ -213,11 +222,10 @@ namespace FluentTerminal.App.ViewModels _terminalView = terminalView; var options = _settingsService.GetTerminalOptions(); - var theme = _settingsService.GetCurrentTheme(); var keyBindings = _settingsService.GetCommandKeyBindings(); var profiles = _settingsService.GetShellProfiles(); - var size = await _terminalView.CreateTerminal(options, theme.Colors, FlattenKeyBindings(keyBindings, profiles)).ConfigureAwait(true); + var size = await _terminalView.CreateTerminal(options, TerminalTheme.Colors, FlattenKeyBindings(keyBindings, profiles)).ConfigureAwait(true); if (!string.IsNullOrWhiteSpace(_startupDirectory)) { @@ -302,11 +310,15 @@ namespace FluentTerminal.App.ViewModels { await _applicationView.RunOnDispatcherThread(async () => { - RaisePropertyChanged(nameof(IsUnderlined)); - RaisePropertyChanged(nameof(BackgroundTabTheme)); + //RaisePropertyChanged(nameof(IsUnderlined)); + //RaisePropertyChanged(nameof(BackgroundTabTheme)); copy paste error? - var currentTheme = _settingsService.GetTheme(e); - await _terminalView.ChangeTheme(currentTheme.Colors).ConfigureAwait(true); + // only change theme if not overwritten by profile + if (TerminalTheme.Id == Guid.Empty) + { + var currentTheme = _settingsService.GetTheme(e); + await _terminalView.ChangeTheme(currentTheme.Colors).ConfigureAwait(true); + } }); } diff --git a/FluentTerminal.App/App.xaml.cs b/FluentTerminal.App/App.xaml.cs index a3f6866..49124a4 100644 --- a/FluentTerminal.App/App.xaml.cs +++ b/FluentTerminal.App/App.xaml.cs @@ -114,7 +114,7 @@ namespace FluentTerminal.App { if (_applicationSettings.NewTerminalLocation == NewTerminalLocation.Tab && _mainViewModels.Count > 0) { - await _mainViewModels.Last().AddTerminal(parameter, false).ConfigureAwait(true); + await _mainViewModels.Last().AddTerminal(parameter, false, Guid.Empty).ConfigureAwait(true); } else { @@ -132,7 +132,7 @@ namespace FluentTerminal.App else if (command == "new") { var viewModel = _container.Resolve(); - await viewModel.AddTerminal(parameter, false).ConfigureAwait(true); + await viewModel.AddTerminal(parameter, false, Guid.Empty).ConfigureAwait(true); await CreateMainView(typeof(MainPage), viewModel, true).ConfigureAwait(true); } } @@ -144,7 +144,7 @@ namespace FluentTerminal.App if (!_alreadyLaunched) { var viewModel = _container.Resolve(); - await viewModel.AddTerminal(null, false).ConfigureAwait(true); + await viewModel.AddTerminal(null, false, Guid.Empty).ConfigureAwait(true); await CreateMainView(typeof(MainPage), viewModel, true).ConfigureAwait(true); Window.Current.Activate(); } @@ -241,7 +241,7 @@ namespace FluentTerminal.App mainViewModel.ShowSettingsRequested += OnShowSettingsRequested; mainViewModel.ShowAboutRequested += OnShowAboutRequested; _mainViewModels.Add(mainViewModel); - await mainViewModel.AddTerminal(directory, false).ConfigureAwait(true); + await mainViewModel.AddTerminal(directory, false, Guid.Empty).ConfigureAwait(true); } if (viewModel is SettingsViewModel settingsViewModel) diff --git a/FluentTerminal.App/FluentTerminal.App.csproj b/FluentTerminal.App/FluentTerminal.App.csproj index c318b00..da0bbd2 100644 --- a/FluentTerminal.App/FluentTerminal.App.csproj +++ b/FluentTerminal.App/FluentTerminal.App.csproj @@ -176,6 +176,7 @@ TerminalColorPicker.xaml + TerminalView.xaml diff --git a/FluentTerminal.App/Views/MainPage.xaml b/FluentTerminal.App/Views/MainPage.xaml index ac5c496..105ce91 100644 --- a/FluentTerminal.App/Views/MainPage.xaml +++ b/FluentTerminal.App/Views/MainPage.xaml @@ -6,7 +6,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:views="using:FluentTerminal.App.Views" - RequestedTheme="{x:Bind ViewModel.Background, Mode=OneWay, Converter={StaticResource BackgroundToApplicationThemeConverter}}" + RequestedTheme="{x:Bind ViewModel.SelectedTerminal.TerminalTheme.Colors.Background, Mode=OneWay, Converter={StaticResource BackgroundToApplicationThemeConverter}}" mc:Ignorable="d"> @@ -15,9 +15,11 @@ + FallbackColor="{x:Bind ViewModel.SelectedTerminal.TerminalTheme.Colors.Background, Mode=OneWay}" + TintColor="{x:Bind ViewModel.SelectedTerminal.TerminalTheme.Colors.Background, Mode=OneWay}" + TintOpacity="{x:Bind ViewModel.BackgroundOpacity, Mode=OneWay}" + TintTransitionDuration="{x:Bind NoDuration}" /> + @@ -66,9 +68,9 @@ Text="About"> + FontFamily="Segoe MDL2 Assets" + Glyph="" + ToolTipService.ToolTip="About" /> diff --git a/FluentTerminal.App/Views/MainPage.xaml.cs b/FluentTerminal.App/Views/MainPage.xaml.cs index 5b82ee1..3ef98c9 100644 --- a/FluentTerminal.App/Views/MainPage.xaml.cs +++ b/FluentTerminal.App/Views/MainPage.xaml.cs @@ -1,5 +1,6 @@ using FluentTerminal.App.Utilities; using FluentTerminal.App.ViewModels; +using System; using System.ComponentModel; using Windows.ApplicationModel.Core; using Windows.UI.Core; @@ -18,6 +19,8 @@ namespace FluentTerminal.App.Views public double CoreTitleBarHeight => coreTitleBar.Height; + public TimeSpan NoDuration => TimeSpan.Zero; + public Thickness CoreTitleBarPadding { get diff --git a/FluentTerminal.App/Views/SettingsPages/ShellProfileSettings.xaml b/FluentTerminal.App/Views/SettingsPages/ShellProfileSettings.xaml index b5f2eaf..2240955 100644 --- a/FluentTerminal.App/Views/SettingsPages/ShellProfileSettings.xaml +++ b/FluentTerminal.App/Views/SettingsPages/ShellProfileSettings.xaml @@ -36,6 +36,18 @@ + + + + + + + + + + + + @@ -221,6 +233,14 @@ ItemTemplateSelector="{StaticResource TabThemeTemplateSelector}" ItemsSource="{x:Bind TabThemes, Mode=OneWay}" SelectedItem="{Binding SelectedTabTheme, Mode=TwoWay}" /> + + + + KeyBindings { get; set; } = new List(); } } \ No newline at end of file