Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31bbf9f

Browse files
committed
fix: handle tray width on scaled systems
1 parent553a19a commit31bbf9f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎App/TrayWindow.xaml.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ private void ResizeWindow()
192192
// Adjust the AppWindow size
193193
varscale=GetDisplayScale();
194194
varheight=(int)(desiredSize.Height*scale);
195-
AppWindow.Resize(newSizeInt32(WIDTH,height));
195+
varwidth=(int)(WIDTH*scale);
196+
AppWindow.Resize(newSizeInt32(width,height));
196197
}
197198

198199
privatedoubleGetDisplayScale()
@@ -232,12 +233,13 @@ private void MoveWindow()
232233
privatePointInt32GetWindowPosition()
233234
{
234235
varheight=AppWindow.Size.Height;
236+
varwidth=AppWindow.Size.Width;
235237
varcursorPosition=_lastActivatePosition;
236238
if(cursorPositionisnull)
237239
{
238240
varprimaryWorkArea=DisplayArea.Primary.WorkArea;
239241
returnnewPointInt32(
240-
primaryWorkArea.Width-WIDTH,
242+
primaryWorkArea.Width-width,
241243
primaryWorkArea.Height-height
242244
);
243245
}
@@ -252,7 +254,7 @@ private PointInt32 GetWindowPosition()
252254
).WorkArea;
253255

254256
// Adjust if the window goes off the right edge of the display.
255-
if(x+WIDTH>workArea.X+workArea.Width)x=workArea.X+workArea.Width-WIDTH;
257+
if(x+width>workArea.X+workArea.Width)x=workArea.X+workArea.Width-width;
256258

257259
// Adjust if the window goes off the bottom edge of the display.
258260
if(y+height>workArea.Y+workArea.Height)y=workArea.Y+workArea.Height-height;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp