Skip to content

Commit

Permalink
Add SideBySide to Keybindings window. Rename ShowSideBySide -> `S…
Browse files Browse the repository at this point in the history
…ideBySide` #89
  • Loading branch information
Ruben2776 committed Sep 7, 2024
1 parent f77bf67 commit 7cd4fc1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/PicView.Avalonia/UI/FunctionsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static Task<Func<Task>> GetFunctionByName(string functionName)

// Misc
"ChangeBackground" => ChangeBackground,
"ShowSideBySide" => ShowSideBySide,
"SideBySide" => SideBySide,
"GalleryClick" => GalleryClick,
"Slideshow" => Slideshow,
"ColorPicker" => ColorPicker,
Expand Down Expand Up @@ -805,9 +805,9 @@ public static async Task ChangeBackground()
await SettingsHelper.SaveSettingsAsync();
}

public static async Task ShowSideBySide()
public static async Task SideBySide()
{
await UIHelper.ShowSideBySide(Vm);
await UIHelper.SideBySide(Vm);
}

public static async Task Reload()
Expand Down
2 changes: 1 addition & 1 deletion src/PicView.Avalonia/UI/UIHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static void ToggleToolsMenu(MainViewModel vm)

#region Settings

public static async Task ShowSideBySide(MainViewModel vm)
public static async Task SideBySide(MainViewModel vm)
{
if (vm is null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/PicView.Avalonia/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ public MainViewModel(IPlatformSpecificService? platformSpecificService)

ChangeBackgroundCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.ChangeBackground);

ShowSideBySideCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.ShowSideBySide);
ShowSideBySideCommand = ReactiveCommand.CreateFromTask(FunctionsHelper.SideBySide);

#endregion Image commands

Expand Down
33 changes: 27 additions & 6 deletions src/PicView.Avalonia/Views/ShortcutsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
</Design.DataContext>
<StackPanel Margin="5,0,2,25">
<TextBlock
x:Name="ApplicationShortcutsTextBlock"
Classes="txt"
FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
FontSize="16"
Margin="10,20,10,15"
Text="{CompiledBinding ApplicationShortcuts}"
TextAlignment="Center" />
TextAlignment="Center"
x:Name="ApplicationShortcutsTextBlock" />
<TextBlock
x:Name="ChangeKeybindingTextBlock"
Classes="txt"
FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
Text="{CompiledBinding ChangeKeybindingText}"
TextAlignment="Center" />
TextAlignment="Center"
x:Name="ChangeKeybindingTextBlock" />
<Button
Classes="BorderStyle altHover mainBtn"
HorizontalAlignment="Center"
Expand All @@ -38,13 +38,13 @@
</Button>

<TextBlock
x:Name="NavigationTextBlock"
Classes="txt"
FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
FontSize="14"
Margin="10,10,10,15"
Text="{CompiledBinding Navigation}"
TextAlignment="Center" />
TextAlignment="Center"
x:Name="NavigationTextBlock" />

<StackPanel Margin="15,0,10,10" Orientation="Horizontal">
<TextBlock
Expand Down Expand Up @@ -519,6 +519,27 @@
Text="{CompiledBinding ImageControl}"
TextAlignment="Center" />

<StackPanel Margin="15,5,10,10" Orientation="Horizontal">
<TextBlock
Classes="txt"
FontFamily="/Assets/Fonts/Roboto-Bold.ttf#Roboto"
Text="{CompiledBinding SideBySide}"
Width="170" />
<customControls:KeybindTextBox
Background="{StaticResource SecondaryBackgroundColor}"
Classes="hover TStyle"
MethodName="SideBySide"
ToolTip.Tip="{CompiledBinding ChangeKeybindingTooltip}"
Width="140" />
<customControls:KeybindTextBox
Alt="True"
Background="{StaticResource SecondaryBackgroundColor}"
Classes="hover TStyle"
MethodName="SideBySide"
ToolTip.Tip="{CompiledBinding ChangeKeybindingTooltip}"
Width="140" />
</StackPanel>

<StackPanel Margin="15,5,10,10" Orientation="Horizontal">
<TextBlock
Classes="txt"
Expand Down

0 comments on commit 7cd4fc1

Please sign in to comment.