-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Theme updates and fixes for macOS build
- Loading branch information
Showing
16 changed files
with
231 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<Window | ||
BorderThickness="1" | ||
ExtendClientAreaChromeHints="SystemChrome" | ||
ExtendClientAreaTitleBarHeightHint="-1" | ||
SizeToContent="WidthAndHeight" | ||
WindowStartupLocation="CenterOwner" | ||
d:DesignHeight="450" | ||
d:DesignWidth="800" | ||
mc:Ignorable="d" | ||
x:Class="PicView.Avalonia.MacOS.Views.BatchResizeWindow" | ||
x:DataType="viewModels:MainViewModel" | ||
xmlns="https://github.com/avaloniaui" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels;assembly=PicView.Avalonia" | ||
xmlns:views="clr-namespace:PicView.Avalonia.Views;assembly=PicView.Avalonia" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<Design.DataContext> | ||
<viewModels:MainViewModel /> | ||
</Design.DataContext> | ||
<Border | ||
BorderBrush="{DynamicResource MainBorderColor}" | ||
BorderThickness="1" | ||
CornerRadius="8"> | ||
<Panel> | ||
|
||
<DockPanel | ||
Background="{DynamicResource SecondaryBackgroundColor}" | ||
Height="28" | ||
PointerPressed="MoveWindow" | ||
VerticalAlignment="Top"> | ||
|
||
<TextBlock | ||
Classes="txt" | ||
Text="{CompiledBinding ResizeImage, | ||
Mode=OneWay}" | ||
TextAlignment="Center" /> | ||
</DockPanel> | ||
|
||
<views:BatchResizeView | ||
Background="{DynamicResource WindowBackgroundColor}" | ||
Margin="0,28,0,0" | ||
Padding="10,5,5,10" | ||
PointerPressed="MoveWindow" | ||
x:Name="XAboutView" /> | ||
</Panel> | ||
</Border> | ||
</Window> |
34 changes: 34 additions & 0 deletions
34
src/PicView.Avalonia.MacOS/Views/BatchResizeWindow.axaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Avalonia.Controls; | ||
using Avalonia.Input; | ||
using PicView.Core.Localization; | ||
|
||
namespace PicView.Avalonia.MacOS.Views; | ||
|
||
public partial class BatchResizeWindow : Window | ||
{ | ||
public BatchResizeWindow() | ||
{ | ||
InitializeComponent(); | ||
Loaded += (_, _) => | ||
{ | ||
MinWidth = MaxWidth = Width; | ||
Height = 500; | ||
Title = TranslationHelper.Translation.BatchResize + " - PicView"; | ||
}; | ||
KeyDown += (_, e) => | ||
{ | ||
if (e.Key is Key.Escape) | ||
{ | ||
Close(); | ||
} | ||
}; | ||
} | ||
|
||
private void MoveWindow(object? sender, PointerPressedEventArgs e) | ||
{ | ||
if (VisualRoot is null) { return; } | ||
|
||
var hostWindow = (Window)VisualRoot; | ||
hostWindow?.BeginMoveDrag(e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.