MCPcopy Create free account
hub / github.com/debuggyo/Exo / setCompact

Method setCompact

ignis/scripts/set_bar_styles.py:250–276  ·  view source on GitHub ↗
(mode: int, bar_id: int = 0)

Source from the content-addressed store, hash-verified

248
249 @staticmethod
250 def setCompact(mode: int, bar_id: int = 0):
251 bar_settings = BarStyles._get_bar_settings(bar_id)
252 bar_settings.set_density(mode)
253 for bar in BarStyles.bar_instances:
254 win = bar.get_window(bar_id)
255 BarStyles._apply_css(win, bar_id)
256
257 height = 40
258 width = 40
259 if mode == 1:
260 height = 35
261 width = 35
262 elif mode == 2:
263 height = 30
264 width = 30
265 elif mode == 3:
266 height = 25
267 width = 25
268
269 if win:
270 if bar_settings.vertical:
271 win.set_width_request(width)
272 else:
273 win.set_height_request(height)
274
275 rebuild_corners()
276 BarStyles._update_all_layouts()
277
278 @staticmethod
279 def setRecordingIndicator(mode: str, bar_id: int = 0):

Callers

nothing calls this directly

Calls 5

rebuild_cornersFunction · 0.85
_get_bar_settingsMethod · 0.80
get_windowMethod · 0.80
_apply_cssMethod · 0.80
_update_all_layoutsMethod · 0.80

Tested by

no test coverage detected