Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" />
<PackageReference Include="Tmds.DBus.Protocol" />
<PackageReference Include="Uno.WinUI.MSAL" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Segmented" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Microsoft.UI.Dispatching;
using Windows.ApplicationModel.DataTransfer;
using Windows.Graphics;
using Windows.Graphics.Display;

namespace AzureKeyVaultStudio.Presentation.ViewModels;

Expand Down Expand Up @@ -215,7 +216,12 @@ private void NewSecret()
(vm as IDisposable)?.Dispose();
};

window.AppWindow.Resize(new SizeInt32 { Width = 640, Height = 680 });

if (OperatingSystem.IsMacOS())
ResizeWindowScaled(window.AppWindow, 640, 680);
else
window.AppWindow.Resize(new SizeInt32 { Width = 640, Height = 680 });

window.AppWindow.Show();
}

Expand Down Expand Up @@ -778,6 +784,13 @@ private async Task Refresh(CancellationToken token)
await FilterAndLoadVaultValueTypeCommand.ExecuteAsync(token);
}

private static void ResizeWindowScaled(Microsoft.UI.Windowing.AppWindow appWindow, int logicalWidth, int logicalHeight)
{
//https://github.com/unoplatform/uno/issues/22217
var scale = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
appWindow.Resize(new SizeInt32 { Width = (int)(logicalWidth * scale), Height = (int)(logicalHeight * scale) });
}

private void ShowInAppNotification(string subject, string message, InfoBarSeverity notificationType)
{
WeakReferenceMessenger.Default.Send(new SendInAppNotificationMessage(new Notification
Expand Down Expand Up @@ -846,7 +859,12 @@ private async Task ShowProperties(KeyVaultItemProperties model)
{
(itemVm as IDisposable)?.Dispose();
};
window.AppWindow.Resize(new SizeInt32 { Width = 620, Height = 580 });

if (OperatingSystem.IsMacOS())
ResizeWindowScaled(window.AppWindow, 620, 680);
else
window.AppWindow.Resize(new SizeInt32 { Width = 640, Height = 680 });

if (Application.Current is App app && app.MainWindow is Window mainWindow)
{
var mainPos = mainWindow.AppWindow.Position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"AzureKeyVaultStudio (WinAppSDK Packaged)": {
"commandName": "MsixPackage",
"compatibleTargetFramework": "windows"
"compatibleTargetFramework": "windows",
"alwaysReinstallApp": true
},
"AzureKeyVaultStudio (Desktop)": {
"commandName": "Project",
Expand Down
1 change: 1 addition & 0 deletions src/uno/AzureKeyVaultStudio/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ItemGroup>
<PackageVersion Include="FluentAssertions" Version="[7.0.0]" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.92.0" />
<PackageVersion Include="Uno.UITest.Helpers" Version="1.1.0-dev.70" />
<PackageVersion Include="Azure.Core" Version="1.50.0" />
<PackageVersion Include="Azure.ResourceManager" Version="1.13.2" />
Expand Down
2 changes: 1 addition & 1 deletion src/uno/global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
// To update the version of Uno please update the version of the Uno.Sdk here. See https://aka.platform.uno/upgrade-uno-packages for more information.
"msbuild-sdks": {
"Uno.Sdk": "6.6.0-dev.162"
"Uno.Sdk": "6.6.0-dev.180"
},
"sdk": {
"allowPrerelease": false
Expand Down
Loading