forked from flathub/flathub
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,41 @@ | ||
From 815cbb49e940456649947e4b38e273bf179352c1 Mon Sep 17 00:00:00 2001 | ||
From e4e97f4036620052d1c6f74f6955ad199531a16c Mon Sep 17 00:00:00 2001 | ||
From: Bastien Nocera <[email protected]> | ||
Date: Thu, 10 Oct 2024 02:22:00 +0200 | ||
Date: Thu, 10 Oct 2024 10:43:14 +0200 | ||
Subject: [PATCH] Use better theme | ||
|
||
--- | ||
NiimPrintX/ui/main.py | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
NiimPrintX/ui/main.py | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/NiimPrintX/ui/main.py b/NiimPrintX/ui/main.py | ||
index 390ff8dbbd8a..774ea8f87792 100644 | ||
index 390ff8dbbd8a..d9fdf9560a08 100644 | ||
--- a/NiimPrintX/ui/main.py | ||
+++ b/NiimPrintX/ui/main.py | ||
@@ -64,12 +64,13 @@ class LabelPrinterApp(tk.Tk): | ||
threading.Thread(target=self.start_asyncio_loop, daemon=True).start() | ||
@@ -1,6 +1,7 @@ | ||
import os | ||
import tkinter as tk | ||
from tkinter import ttk | ||
+import ttkthemes | ||
from tkinter import messagebox | ||
|
||
self.app_config = AppConfig() | ||
+ style = ttk.Style(self) | ||
if self.app_config.os_system == "Darwin": | ||
- style = ttk.Style(self) | ||
style.theme_use('aqua') | ||
from .AppConfig import AppConfig | ||
@@ -70,6 +71,9 @@ class LabelPrinterApp(tk.Tk): | ||
elif self.app_config.os_system == "Windows": | ||
- style = ttk.Style(self) | ||
style = ttk.Style(self) | ||
style.theme_use('xpnative') | ||
+ else: | ||
+ style.theme_use('radiance') | ||
+ style = ttkthemes.ThemedStyle() | ||
+ style.theme_use('yaru') | ||
|
||
self.create_widgets() | ||
self.create_menu() | ||
@@ -131,4 +135,4 @@ if __name__ == "__main__": | ||
app.load_resources() | ||
app.mainloop() | ||
except Exception as e: | ||
- raise e | ||
\ No newline at end of file | ||
+ raise e | ||
-- | ||
2.46.2 | ||
|