mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-21 10:32:23 +00:00
made other bits work
This commit is contained in:
parent
841ce1ba3b
commit
172b943f26
@ -157,18 +157,17 @@ class Window(QObject):
|
||||
return
|
||||
|
||||
# Find the primary monitor
|
||||
primary = [k for k in self.xrandr_info if self.xrandr_info[k]["primary"]]
|
||||
primary = self.screen.get_primary()
|
||||
if not primary:
|
||||
print("Oops, no primary!")
|
||||
return
|
||||
primary = self.xrandr_info[primary[0]]
|
||||
monitor = self.xrandr_info[mon]
|
||||
monitor = self.screen.monitors[mon]
|
||||
|
||||
prim_density_x = primary["res_x"] / primary["w_in_mm"]
|
||||
prim_density_y = primary["res_y"] / primary["h_in_mm"]
|
||||
prim_density_x = primary.res_x / primary.w_in_mm
|
||||
prim_density_y = primary.res_y / primary.h_in_mm
|
||||
|
||||
dens_x = monitor["res_x"] / monitor["w_in_mm"]
|
||||
dens_y = monitor["res_y"] / monitor["h_in_mm"]
|
||||
dens_x = monitor.res_x / monitor.w_in_mm
|
||||
dens_y = monitor.res_y / monitor.h_in_mm
|
||||
|
||||
try:
|
||||
self.ui.horizontalScale.valueChanged.disconnect(
|
||||
|
Loading…
Reference in New Issue
Block a user