mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 14:24:16 +02:00
[ui] feature: themes
This commit is contained in:
@@ -19,3 +19,11 @@ def load_icon(path: str, width: int, height: int = None) -> QIcon:
|
||||
|
||||
def load_resource_icon(path: str, width: int, height: int = None) -> QIcon:
|
||||
return load_icon(resource.get_path(path), width, height)
|
||||
|
||||
|
||||
def measure_based_on_width(percent: float) -> int:
|
||||
return round(percent * QApplication.primaryScreen().size().width())
|
||||
|
||||
|
||||
def measure_based_on_height(percent: float) -> int:
|
||||
return round(percent * QApplication.primaryScreen().size().height())
|
||||
|
||||
Reference in New Issue
Block a user