fix(monitor-manager): account for scale when computing logical monitor size
logical_width/height now divide physical pixels by scale so the canvas correctly represents the compositor's coordinate space (e.g. 3840px @1.5x is 2560 logical px wide, not 3840). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
f8b5f1aa6a
commit
7016388210
|
|
@ -114,14 +114,14 @@ class MonitorState:
|
||||||
@property
|
@property
|
||||||
def logical_width(self) -> int:
|
def logical_width(self) -> int:
|
||||||
if (self.transform & 3) in (1, 3):
|
if (self.transform & 3) in (1, 3):
|
||||||
return self.height
|
return round(self.height / self.scale)
|
||||||
return self.width
|
return round(self.width / self.scale)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def logical_height(self) -> int:
|
def logical_height(self) -> int:
|
||||||
if (self.transform & 3) in (1, 3):
|
if (self.transform & 3) in (1, 3):
|
||||||
return self.width
|
return round(self.width / self.scale)
|
||||||
return self.height
|
return round(self.height / self.scale)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mode_str(self) -> str:
|
def mode_str(self) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue