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

Method __init__

ignis/modules/settings/tabs/interface.py:259–316  ·  view source on GitHub ↗
(self, name: str, widget_name: str, description: str)

Source from the content-addressed store, hash-verified

257
258class BarModuleSettings(SettingsRow):
259 def __init__(self, name: str, widget_name: str, description: str):
260 self._widget_name = widget_name
261
262 super().__init__(
263 title=f"{name} Widget",
264 description=description,
265 css_classes=["module-options"],
266 child=[
267 widgets.Box(
268 vertical=False,
269 child=[
270 make_toggle_buttons(
271 [
272 (None, 0, "timer_1"),
273 (None, 1, "timer_2"),
274 ],
275 lambda: getattr(
276 user_settings.interface.modules.bar_id,
277 self._widget_name,
278 ),
279 self._set_widget_bar_id,
280 on_any_click=None,
281 widget=self._widget_name,
282 ),
283 ],
284 ),
285 widgets.Separator(),
286 widgets.Box(
287 vertical=False,
288 child=[
289 make_toggle_buttons(
290 [
291 ("Start", 0),
292 ("Center", 1),
293 ("End", 2),
294 ],
295 lambda: getattr(
296 user_settings.interface.modules.location,
297 self._widget_name,
298 ),
299 self._set_widget_location,
300 on_any_click=None,
301 widget=self._widget_name,
302 ),
303 ],
304 ),
305 widgets.Separator(),
306 widgets.Switch(
307 vexpand=False,
308 valign="center",
309 active=getattr(
310 user_settings.interface.modules.visibility,
311 self._widget_name,
312 ),
313 on_change=self._set_widget_visibility,
314 ),
315 ],
316 )

Callers

nothing calls this directly

Calls 2

make_toggle_buttonsFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected