Spaces:
Sleeping
Sleeping
Update roop/ui.py
Browse files- roop/ui.py +28 -1
roop/ui.py
CHANGED
|
@@ -12,7 +12,34 @@ except ImportError:
|
|
| 12 |
def _require(self): pass
|
| 13 |
TkinterDnD = MockTkinterDnD
|
| 14 |
DND_ALL = 'DND_ALL'
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
from typing import Any, Callable, Tuple, Optional
|
| 17 |
import cv2
|
| 18 |
from PIL import Image, ImageOps
|
|
|
|
| 12 |
def _require(self): pass
|
| 13 |
TkinterDnD = MockTkinterDnD
|
| 14 |
DND_ALL = 'DND_ALL'
|
| 15 |
+
|
| 16 |
+
# Robust Mock for CustomTkinter
|
| 17 |
+
class MockCTKModule:
|
| 18 |
+
class CTk:
|
| 19 |
+
def __init__(self, *args, **kwargs): pass
|
| 20 |
+
def minsize(self, *args, **kwargs): pass
|
| 21 |
+
def title(self, *args, **kwargs): pass
|
| 22 |
+
def configure(self, *args, **kwargs): pass
|
| 23 |
+
def protocol(self, *args, **kwargs): pass
|
| 24 |
+
class CTkLabel: pass
|
| 25 |
+
class CTkButton: pass
|
| 26 |
+
class CTkEntry: pass
|
| 27 |
+
class CTkSlider: pass
|
| 28 |
+
class CTkSwitch: pass
|
| 29 |
+
class CTkCheckBox: pass
|
| 30 |
+
class CTkOptionMenu: pass
|
| 31 |
+
class CTkToplevel: pass
|
| 32 |
+
class ThemeManager:
|
| 33 |
+
theme = {'RoopDropArea': {'fg_color': 'gray'}, 'RoopDonate': {'text_color': 'blue'}}
|
| 34 |
+
|
| 35 |
+
@staticmethod
|
| 36 |
+
def deactivate_automatic_dpi_awareness(): pass
|
| 37 |
+
@staticmethod
|
| 38 |
+
def set_appearance_mode(mode): pass
|
| 39 |
+
@staticmethod
|
| 40 |
+
def set_default_color_theme(theme): pass
|
| 41 |
+
|
| 42 |
+
ctk = MockCTKModule()
|
| 43 |
from typing import Any, Callable, Tuple, Optional
|
| 44 |
import cv2
|
| 45 |
from PIL import Image, ImageOps
|