feat(desktop): now move widget with drag to any place of window

This commit is contained in:
sankalp committed 2026-07-26 17:00:02 +05:45
1 parent 65db4f75fe
commit 37b262270c
15 files changed
+1754 -888

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
class DesktopWidgetRegistry:
_widgets = {}
_sizes = {}
@classmethod
def register(cls, key: str, widget_cls, size: tuple[int, int]):
cls._widgets[key] = widget_cls
cls._sizes[key] = size
@classmethod
def get_widget_class(cls, key: str):
return cls._widgets.get(key)
@classmethod
def get_widget_size(cls, key: str) -> tuple[int, int]:
return cls._sizes.get(key, (174, 174))