Skip to content

Commit 004c228

Browse files
committed
Fix wield btn color in different OS
1 parent 22f06c8 commit 004c228

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/inputmodule/gui/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import threading
33
import sys
4+
import platform
45
import tkinter as tk
56
from tkinter import ttk, messagebox
67

@@ -53,7 +54,10 @@ def run_gui(devices):
5354
style.configure("TLabelframe", background="#2b2b2b", foreground="white")
5455
style.configure("TLabelframe.Label", background="#2b2b2b", foreground="white")
5556
style.configure("TCheckbutton", background="#2b2b2b", foreground="white")
56-
style.configure("TButton", background="white", foreground="#2b2b2b")
57+
if platform.system() == "Windows": # On Windows, I don't know why background always stays white even if I set it to black
58+
style.configure("TButton", background="white", foreground="#2b2b2b")
59+
else:
60+
style.configure("TButton", background="#2b2b2b", foreground="white")
5761
style.configure("TEntry", fieldbackground="#2b2b2b", foreground="white")
5862
style.configure("TCombobox", fieldbackground="#2b2b2b", foreground="white")
5963
style.configure("TScale", background="#2b2b2b", troughcolor="gray")

0 commit comments

Comments
 (0)