Skip to content

Commit

Permalink
Update UI/UX, update icons, expand contextmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Sep 28, 2024
1 parent 4b4e026 commit 7ff586d
Show file tree
Hide file tree
Showing 9 changed files with 646 additions and 206 deletions.
404 changes: 399 additions & 5 deletions src/PicView.Avalonia/PicViewTheme/Icons.axaml

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/PicView.Avalonia/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,14 @@ public bool IsFillSquareMenuChecked
#region Fields

#region Booleans

private IImage? _changeCtrlZoomImage;

public IImage? ChangeCtrlZoomImage
{
get => _changeCtrlZoomImage;
set => this.RaiseAndSetIfChanged(ref _changeCtrlZoomImage, value);
}

private bool _isLoading;

Expand Down Expand Up @@ -782,7 +790,7 @@ public double GetZoomSpeed

public string? GetFlipped
{
get => _getFlipped;
get => ScaleX == -1 ? UnFlip : Flip;
set => this.RaiseAndSetIfChanged(ref _getFlipped, value);
}

Expand Down
8 changes: 8 additions & 0 deletions src/PicView.Avalonia/Views/AboutView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,13 @@
ToolTip.Tip="https://fontawesome.com/">
<TextBlock Classes="txt" Text="Font Awesome" />
</HyperlinkButton>

<HyperlinkButton
HorizontalAlignment="Center"
Margin="0,1,0,1"
NavigateUri="https://lucide.dev/"
ToolTip.Tip="https://lucide.dev/">
<TextBlock Classes="txt" Text="Lucide" />
</HyperlinkButton>
</StackPanel>
</UserControl>
109 changes: 29 additions & 80 deletions src/PicView.Avalonia/Views/BottomBar.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,103 +14,52 @@
<ContextMenu x:Name="MainContextMenu">

<!-- Next -->
<MenuItem Command="{CompiledBinding NextCommand}" Header="{CompiledBinding NextImage, Mode=OneWay}">
<MenuItem
Command="{CompiledBinding NextCommand}"
Header="{CompiledBinding NextImage,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Path
Data="{StaticResource PlayGeometry}"
Height="11"
Stretch="Fill"
Stroke="{DynamicResource MainIconColor}"
StrokeThickness="1"
Width="11" />
<Image
Height="12"
Source="{StaticResource NextImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<!-- Prev -->
<MenuItem Command="{CompiledBinding PreviousCommand}" Header="{CompiledBinding PrevImage, Mode=OneWay}">
<MenuItem
Command="{CompiledBinding PreviousCommand}"
Header="{CompiledBinding PrevImage,
Mode=OneWay}"
StaysOpenOnClick="True">
<MenuItem.Icon>
<Path
Data="{StaticResource PlayGeometry}"
Height="11"
Stretch="Fill"
Stroke="{DynamicResource MainIconColor}"
StrokeThickness="1"
Width="11">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1" />
</TransformGroup>
</Path.RenderTransform>
</Path>
<Image
Height="12"
Source="{StaticResource PrevImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<Separator />

<!-- First Image -->
<MenuItem Command="{CompiledBinding FirstCommand}" Header="{CompiledBinding FirstImage}">
<MenuItem.Icon>
<Image Height="14" Width="14">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
<GeometryDrawing Geometry="F1 M512,512z M0,0z M400,111L400,401C400,418.44,383,429.52,369,421.16L121.09,272.79C108.97,265.54,108.97,246.46,121.09,239.21L369,90.84C383,82.48,400,93.56,400,111z">
<GeometryDrawing.Pen>
<Pen
Brush="{DynamicResource MainIconColor}"
LineJoin="Miter"
MiterLimit="1"
Thickness="32" />
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Geometry="F1 M512,512z M0,0z M112,80L112,432">
<GeometryDrawing.Pen>
<Pen
Brush="{DynamicResource MainIconColor}"
LineJoin="Miter"
MiterLimit="1"
Thickness="32" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
<Image
Height="12"
Source="{StaticResource FirstImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

<!-- Last Image -->
<MenuItem Command="{CompiledBinding LastCommand}" Header="{CompiledBinding LastImage, Mode=OneWay}">
<MenuItem.Icon>
<Image Height="14" Width="14">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
<GeometryDrawing Geometry="F1 M512,512z M0,0z M112,111L112,401C112,418.44,129,429.52,143,421.16L390.9,272.79C403.02,265.54,403.02,246.46,390.9,239.21L143,90.84C129,82.48,112,93.56,112,111z">
<GeometryDrawing.Pen>
<Pen
Brush="{DynamicResource MainIconColor}"
LineJoin="Miter"
MiterLimit="1"
Thickness="32" />
</GeometryDrawing.Pen>
</GeometryDrawing>
<GeometryDrawing Geometry="F1 M512,512z M0,0z M400,80L400,432">
<GeometryDrawing.Pen>
<Pen
Brush="{DynamicResource MainIconColor}"
LineJoin="Miter"
MiterLimit="1"
Thickness="32" />
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
<Image
Height="12"
Source="{StaticResource LastImage}"
Width="12" />
</MenuItem.Icon>
</MenuItem>

Expand All @@ -121,7 +70,7 @@
<MenuItem.Icon>
<Image
Height="14"
Source="{StaticResource FolderImage}"
Source="{StaticResource NextFolderImage}"
Width="14" />
</MenuItem.Icon>
</MenuItem>
Expand All @@ -131,7 +80,7 @@
<MenuItem.Icon>
<Image
Height="14"
Source="{StaticResource FolderImage}"
Source="{StaticResource PrevFolderImage}"
Width="14" />
</MenuItem.Icon>
</MenuItem>
Expand Down
Loading

0 comments on commit 7ff586d

Please sign in to comment.