Skip to content

Commit

Permalink
Removed config scaling_factor.
Browse files Browse the repository at this point in the history
Changed font sizes and components scaling.
  • Loading branch information
ATATC committed Feb 14, 2024
1 parent a9fdcb0 commit a341f66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 4 additions & 5 deletions leads_gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ def __init__(self, base: dict[str, _Any]) -> None:
self.no_title_bar: bool = False
self.manual_mode: bool = False
self.refresh_rate: int = 30
self.font_size_small: int = 8
self.font_size_medium: int = 16
self.font_size_large: int = 32
self.font_size_x_large: int = 48
self.scaling_factor: float = .8 if get_system_platform() == "linux" else 1
self.font_size_small: int = 12
self.font_size_medium: int = 24
self.font_size_large: int = 40
self.font_size_x_large: int = 56
self.comm_addr: str = "127.0.0.1"
self.comm_port: int = 16900
self.data_dir: str = "./data"
Expand Down
4 changes: 2 additions & 2 deletions leads_gui/prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from time import sleep as _sleep
from typing import Callable as _Callable, Self as _Self, TypeVar as _TypeVar, Generic as _Generic

from customtkinter import CTk as _CTk, CTkBaseClass as _CTkBaseClass
from customtkinter import CTk as _CTk, CTkBaseClass as _CTkBaseClass, CTkLabel as _CTkLabel

from leads_gui.runtime import RuntimeData
from leads_gui.system import get_system_platform
Expand Down Expand Up @@ -124,7 +124,7 @@ def layout(self, layout: list[list[str | Widget]]) -> None:
length = len(row)
for j in range(length):
s = int(t / length)
row[j].grid(row=i, column=j * s, columnspan=s, ipadx=4, ipady=4, padx=2, pady=2)
row[j].grid(row=i, column=j * s, sticky="NSEW", columnspan=s, ipadx=4, ipady=2, padx=2)

def window(self) -> Window:
return self._window
Expand Down
3 changes: 3 additions & 0 deletions leads_vec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def post_suspend(self, e: SuspensionEvent) -> None:
["dtcs_status", "abs_status", "ebi_status", "atbs_status", "comm_status"],
["dtcs", "abs", "ebi", "atbs"]
])
CTkLabel(uim.root(), text="").grid(row=3, column=0)
uim.root().grid_rowconfigure(0, weight=1)
uim.root().grid_rowconfigure(3, weight=2)
uim.show()
uim.rd().comm_kill()
return 0

0 comments on commit a341f66

Please sign in to comment.