mirror of
https://github.com/ralsina/xrandroll.git
synced 2024-11-24 12:02:23 +00:00
made orientation selection work
This commit is contained in:
parent
60038ae394
commit
eb3f31cf15
@ -251,9 +251,9 @@ class Window(QObject):
|
||||
# self.scale_changed() # Trigger scale labels update
|
||||
|
||||
def orientation_changed(self):
|
||||
mon = self.ui.screenCombo.currentText()
|
||||
orientation = self.ui.orientationCombo.currentIndex()
|
||||
self.xrandr_info[mon]["orientation"] = orientation
|
||||
mon_name = self.ui.screenCombo.currentText()
|
||||
orientation = self.ui.orientationCombo.currentText().split()[0].lower()
|
||||
self.screen.monitors[mon_name].orientation = orientation
|
||||
self.mode_changed()
|
||||
|
||||
def mode_changed(self):
|
||||
|
@ -22,11 +22,11 @@ class MonitorItem(QGraphicsRectItem, QObject):
|
||||
self.setPos(monitor.pos_x, monitor.pos_y)
|
||||
if monitor.orientation == "normal":
|
||||
self.bottom_edge.setRect(0, monitor.res_y - 50, monitor.res_x, 50)
|
||||
elif monitor.orientation == 1:
|
||||
elif monitor.orientation == "left":
|
||||
self.bottom_edge.setRect(monitor.res_x - 50, 0, 50, monitor.res_y)
|
||||
elif monitor.orientation == 2:
|
||||
elif monitor.orientation == "inverted":
|
||||
self.bottom_edge.setRect(0, 0, monitor.res_x, 50)
|
||||
elif monitor.orientation == 3:
|
||||
elif monitor.orientation == "right":
|
||||
self.bottom_edge.setRect(0, 0, 50, monitor.res_y)
|
||||
if monitor.replica_of:
|
||||
label_text = f"{self.name} [{','.join(monitor.replica_of)}]"
|
||||
|
Loading…
Reference in New Issue
Block a user