Skip to content

Commit

Permalink
Apply UIScale to ControlWindow size (#2045)
Browse files Browse the repository at this point in the history
Co-authored-by: ike709 <ike709@github.com>
Co-authored-by: wixoa <wixoag@gmail.com>
  • Loading branch information
3 people authored Oct 20, 2024
1 parent 01e2945 commit e5a56c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OpenDreamClient/Interface/Controls/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,11 @@ public override void SetProperty(string property, string value, bool manualWinse
switch (property) {
case "size":
if (_myWindow.osWindow is {ClydeWindow: not null}) {
_myWindow.osWindow.ClydeWindow.Size = new DMFPropertySize(value).Vector;
var size = new DMFPropertySize(value);
var uiScale = _myWindow.osWindow.UIScale;
size.X = (int)(size.X * uiScale); // TODO: RT should probably do this itself
size.Y = (int)(size.Y * uiScale);
_myWindow.osWindow.ClydeWindow.Size = size.Vector;
}

return;
Expand Down

0 comments on commit e5a56c9

Please sign in to comment.