Replies: 9 comments
-
Hey, thanks a lot for the support... Yes, the hPyt Preview App was written in Python using the customTkinter library 😃 |
Beta Was this translation helpful? Give feedback.
-
@Zingzy |
Beta Was this translation helpful? Give feedback.
-
The glass mode on windows 11 is called Mica and I used this library to do so 😃 |
Beta Was this translation helpful? Give feedback.
-
@Zingzy from hPyT import *
from customtkinter import * # you can use any other library from the above mentioned list
from win32mica import ApplyMica, MicaTheme, MicaStyle
window = CTk() # creating a window using CustomTkinter
window.title("Talayar")
window.geometry('1280x720')
set_appearance_mode('dark')
mode = MicaTheme.DARK # Dark mode mica effect
mode = MicaTheme.LIGHT # Light mode mica effect
mode = MicaTheme.AUTO # Apply system theme, and change it if system theme changes
style = MicaStyle.DEFAULT # Default backdrop effect
style = MicaStyle.ALT # Alt backdrop effect
def callbackFunction(NewTheme):
if NewTheme == MicaTheme.DARK:
print("Theme has changed to dark!")
else:
print("Theme has changed to light!")
hwnd = window.winId().__int__()
ApplyMica(HWND=hwnd, Theme=mode, Style=style, OnThemeChange=callbackFunction)
window_frame.center(window)
window.mainloop() I hope you will always be like this: 😃 |
Beta Was this translation helpful? Give feedback.
-
@Nigacatch Thats a wierd error, perhaps you are using an older version of Upgrade win32mica to the latest version: pip install --upgrade win32mica There were some problem in the script too, here is the fixed script: from hPyT import *
from customtkinter import * # you can use any other library from the above mentioned list
from win32mica import ApplyMica, MicaTheme, MicaStyle
window = CTk() # creating a window using CustomTkinter
window.title("Talayar")
window.configure(fg_color="black")
window.geometry('1280x720')
set_appearance_mode('dark')
mode = MicaTheme.AUTO # Apply system theme, and change it if system theme changes
style = MicaStyle.ALT # MIcaAlt backdrop effect
def callbackFunction(NewTheme):
if NewTheme == MicaTheme.DARK:
print("Theme has changed to dark!")
else:
print("Theme has changed to light!")
hwnd = window.frame() # window.winId().__int__() does not work for tkinter
ApplyMica(HWND=hwnd, Theme=mode, Style=style, OnThemeChange=callbackFunction)
window_frame.center(window)
window.mainloop() |
Beta Was this translation helpful? Give feedback.
-
@Zingzy thank you again... so 😃 |
Beta Was this translation helpful? Give feedback.
-
WOW looks amazing 😍 |
Beta Was this translation helpful? Give feedback.
-
@Zingzy |
Beta Was this translation helpful? Give feedback.
-
Ok, no problem 👍 |
Beta Was this translation helpful? Give feedback.
-
Hello, thank you for this library.
I wanted to know with which gui library the hPyt Preview App v1.2.0 was written in Python?
Was it with customTkinter?
Beta Was this translation helpful? Give feedback.
All reactions