Customize your python UI window with awesome pre-built windows 11 themes.
License: Creative Commons Zero v1.0 Universal
not working with PySimpleGUI
I tried :
pywinstyles.apply_style(window.TKroot, 'mica')
and :
from ctypes import windll import pywinstyles hwnd = windll.user32.GetActiveWindow() pywinstyles.change_header_color(hwnd, color="blue")
lib\site-packages\customtkinter\windows\widgets\core_widget_classes\ctk_base_class.py", line 111, in config
raise AttributeError("'config' is not implemented for CTk widgets. For consistency, always use 'configure' instead.")
AttributeError: 'config' is not implemented for CTk widgets. For consistency, always use 'configure' instead.
When I try to activate the theme change to aero for the ctk.frame object, I get this error.
This library looks just fine. If it could be used in my project it would be very good. The parts of the code I'm trying to integrate it through:
class App(ctk.CTk):
def init(self):
super().init()
root = ctk.CTk()
ctk.set_default_color_theme("green") # Themes: "blue" (standard), "green", "dark-blue"
ctk.set_appearance_mode("dark")
self.title("")
self.geometry(f"{520}x{235}")
#Creating Main Frame
self.main_frame = ctk.CTkFrame(self, width=510,height=290)
self.main_frame.grid(row=0, column=10,columnspan=10, rowspan=10, ipadx=5, ipady=0, padx=0, pady=0, sticky="nw")
self.main_frame.grid_rowconfigure(3, weight=1)
self.cancel_button = ctk.CTkButton(self.main_frame, text = "Change",font=("Arial", 15),command=self.change_style('aero'))
self.cancel_button.grid(row=5, column=5,columnspan=2, padx=5, pady=10, rowspan=1)
def change_style(self,e):
pywinstyles.apply_style(self.main_frame, e)
import customtkinter
import os
from PIL import Image
import pywinstyles
class App(customtkinter.CTk):
def init(self):
super().init()
self.title("TASK V1")
self.iconbitmap(r"C:\Users\musta\Downloads\New folder\bot.ico")
self.grid_rowconfigure(1, weight=1)
self.columnconfigure(2, weight=1)
# create scrollable checkbox frame
self.scrollable_checkbox_frame = ScrollableCheckBoxFrame(master=self, width=200, command=self.checkbox_frame_event,
item_list=[f"item {i}" for i in range(15)])
self.scrollable_checkbox_frame.grid(row=1, column=0, padx=15, pady=15, sticky="ns")
#if name == "main":
app = App()
pywinstyles.apply_style(app, 'acrylic')
app.mainloop()
self.toplevel_window.focus()
not particularly the code but across all the gui's that were previously working with the acrylic window now only appear slightly grey
ever since my laptop updated to the latest windows 11 update
System: Windows 10 22H2 19045.3448
GPU: NVIDIA GeForce RTX 3060
Python:3.11.5
Enabling the "Transparency Effects" option in Personalization > Colors leads to severe lag when using transparent themes (acrylic, aero, transparent). When dragging windows, there is a significant delay, with windows gradually moving to the mouse's position. Even after releasing the mouse, the windows continue to move until they reach the final release point. Additionally, the GPU usage of the Desktop Window Manager (dwm.exe) ranges from approximately 5% to 30%.
Disabling the "Transparency Effects" option doesn't result in a noticeable difference in GPU usage by the Desktop Window Manager (dwm.exe), but the lag issue disappears.
code:
import tkinter
import pywinstyles
root = tkinter.Tk()
pywinstyles.apply_style(root, "acrylic")
root.mainloop()
Hey, So I use canvas to my app for position and things like that. Now when I use PyWinStyles it wont work because of the canavs, How do I make it part of the canvas?
when I set
root.resizable(width=False, height=False)
The style doesn't change. I'm using normal tkinter.
def ChangeDWMAccent(hWnd: int, attrib: int, state: int, color: str | None = None) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
The | operator only supports python 3.10 and newer.
from typing import Union
def ChangeDWMAccent(hWnd: int, attrib: int, state: int, color: Union[str, None] = None) -> None:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.