From 1dd167cfa63709e5cff6923ca9aef4b39f2dafe8 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Thu, 18 May 2023 13:22:24 -0600 Subject: activate sun valley theme --- main.py | 10 ++++++++-- poetry.lock | 11 ++++++++++- pyproject.toml | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 8bd80dd..aec2315 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,10 @@ import tkinter as tk from tkinter import ttk from tkinter.filedialog import askopenfilename, asksaveasfilename +import sv_ttk + +import os + def pyramid_list(lst): i = 0 rows = 0 @@ -92,8 +96,9 @@ class CompanySelector: # Initialize some parameters img_width = 3300 - img_height = 2550 + img_height = 1550 #2550 block_color = (0, 0, 255) # Blue color + dividend_color = (0, 255, 0) # Green color font_color = (255, 255, 255) # White color padding = 10 # Padding around blocks radius = 20 @@ -232,5 +237,6 @@ class CompanySelector: if __name__ == "__main__": root = tk.Tk() app = CompanySelector(root) - #root.geometry("500x200") + if os.name != "posix": + sv_ttk.set_theme("dark") root.mainloop() diff --git a/poetry.lock b/poetry.lock index 8593ea0..1a88cff 100644 --- a/poetry.lock +++ b/poetry.lock @@ -295,6 +295,14 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "sv-ttk" +version = "2.4.5" +description = "A gorgeous theme for Tkinter, based on Windows 11's UI" +category = "main" +optional = false +python-versions = ">=3.4" + [[package]] name = "tomli" version = "2.0.1" @@ -347,7 +355,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-co [metadata] lock-version = "1.1" python-versions = ">=3.9,<3.12" -content-hash = "31737a76d2d951406282db0245184cb876d50a65624ce7aa9bc4f307c3be8429" +content-hash = "a7a1966a3c5f79e737f2d79e556b59f75b2167a18ac0eab727aac3952efab93b" [metadata.files] altgraph = [] @@ -373,6 +381,7 @@ pytz = [] pywin32-ctypes = [] setuptools-scm = [] six = [] +sv-ttk = [] tomli = [] typing-extensions = [] tzdata = [] diff --git a/pyproject.toml b/pyproject.toml index b487a21..fd0a237 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ openpyxl = "^3.1.2" Pillow = "^9.5.0" matplotlib = "^3.7.1" pyinstaller = "^5.11.0" +sv-ttk = "^2.4.5" [tool.poetry.dev-dependencies] -- cgit v1.2.3