Untitled
unknown
plain_text
a year ago
1.5 kB
8
Indexable
class SettingsMenu(ctk.CTkFrame):
def __init__(self, parent, dark_mode):
# Customizable dimensions
self.menu_width = 300
self.menu_height = 600
# Border color same as circle rings
self.border_color = '#2c2c2e' if dark_mode else '#e5e5e7'
super().__init__(
parent,
fg_color='#1c1c1e' if dark_mode else '#f5f5f7',
width=self.menu_width,
height=self.menu_height,
border_width=2, # Add border width
border_color=self.border_color # Set border color
)
self.parent = parent
self.dark_mode = dark_mode
self.is_open = False
self.animation_running = False
self.current_width = 0
self.target_width = self.menu_width
# Place the frame initially off-screen, aligned to right edge
# Changed x offset to self.menu_width + 2 to account for border width
self.place(relx=1, rely=0, x=self.menu_width + 2, y=0, anchor='ne')
# Create main container for content
self.main_container = ctk.CTkFrame(
self,
fg_color='transparent',
width=self.menu_width,
height=self.menu_height
)
self.main_container.pack(fill='both', expand=True)
# Create settings content
self.create_menu_content()Editor is loading...
Leave a Comment