-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
36 lines (26 loc) · 896 Bytes
/
constants.py
File metadata and controls
36 lines (26 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from __future__ import annotations
from dataclasses import dataclass
@dataclass(frozen=True)
class LayoutBreakpoints:
WIDE_MIN_WIDTH: int = 140
TABLET_MIN_WIDTH: int = 80
NARROW_MIN_WIDTH: int = 40
@dataclass(frozen=True)
class UIDefaults:
LOG_HISTORY: int = 200
SPINNER_FRAMES: str = "|/-\\"
SCAN_TIMEOUT: float = 0.25
HELP_PREVIEW_MIN: int = 5
HELP_PREVIEW_MAX: int = 10
@dataclass(frozen=True)
class LayoutSizing:
min_left_width: int
min_right_width: int
left_ratio: float
left_margin: int = 2
column_gap: int = 2
LAYOUT = LayoutBreakpoints()
UI = UIDefaults()
AUTODEVOPS_LAYOUT = LayoutSizing(min_left_width=24, min_right_width=24, left_ratio=0.58)
LOADMODEL_LAYOUT = LayoutSizing(min_left_width=24, min_right_width=28, left_ratio=0.55)
LOADMODEL_DIST_LAYOUT = LayoutSizing(min_left_width=26, min_right_width=32, left_ratio=0.55)