Skip to content

Commit 3196039

Browse files
committed
added separate layout icon for 'Toggle Tiling' mode
1 parent e27d6fa commit 3196039

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/core/widgets/komorebi/active_layout.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@ def line(start, end):
138138
line(c - vec(-r / 2, r), c + vec(r / 2, r))
139139
elif self.layout_name == "monocle" or self.layout_name == "maximised":
140140
pass
141+
elif self.layout_name == "tiling":
142+
rect_left = QRectF(icon_rect)
143+
rect_left.setWidth(icon_rect.width() * 0.5)
144+
rect_left.setHeight(icon_rect.height() * 0.5)
145+
rect_right = QRectF(rect_left)
146+
147+
rect_left.moveTopLeft(
148+
icon_rect.topLeft() + vec(icon_rect.width() * 0.1, icon_rect.height() * 0.1)
149+
)
150+
rect_right.moveTopLeft(
151+
icon_rect.topLeft() + vec(icon_rect.width() * 0.35, icon_rect.height() * 0.35)
152+
)
153+
154+
painter.fillRect(rect_left, self.palette().color(self.foregroundRole()))
155+
painter.drawRect(rect_right)
141156
elif self.layout_name == "paused":
142157
rect_left = QRectF(icon_rect)
143158
rect_right = QRectF(rect_left)

0 commit comments

Comments
 (0)