[!] fix hide_topbar
This commit is contained in:
parent
cdb1f32de6
commit
95512992b6
@ -1,10 +1,10 @@
|
||||
from ctypes import windll
|
||||
import ctypes
|
||||
from threading import Thread
|
||||
from typing import Optional, Union, Tuple
|
||||
|
||||
from customtkinter import CTkToplevel, CTkProgressBar, CTkLabel, ThemeManager, CTkFont
|
||||
from win32gui import CreateRoundRectRgn, SetWindowRgn
|
||||
from loguru import logger as _logger
|
||||
from win32gui import CreateRoundRectRgn, SetWindowRgn
|
||||
|
||||
logger = _logger.bind(module="CTkLoadingBox", prefix="misc")
|
||||
|
||||
@ -43,7 +43,7 @@ class CTkLoadingBox(CTkToplevel):
|
||||
if hide_topbar:
|
||||
self.overrideredirect(True)
|
||||
# Округление окна
|
||||
hwnd = windll.user32.GetForegroundWindow()
|
||||
hwnd = ctypes.windll.user32.GetParent(self.winfo_id())
|
||||
region = CreateRoundRectRgn(0, 0, 300, 300, 150, 150) # Радиус круга
|
||||
SetWindowRgn(hwnd, region, True)
|
||||
self.bind("<ButtonPress-1>", self.__start_move)
|
||||
|
Loading…
x
Reference in New Issue
Block a user