mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
removed default geometry call from CTk, fixed CTkInputDialog
This commit is contained in:
parent
1db775a6f6
commit
1254a39161
@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
ToDo:
|
||||
- finish string dialog
|
||||
- change font attribute in wiki
|
||||
- add new button attributes to wiki
|
||||
|
||||
|
@ -28,14 +28,14 @@ class CTkInputDialog(CTkToplevel):
|
||||
|
||||
super().__init__(fg_color=fg_color)
|
||||
|
||||
self._fg_color = ThemeManager.theme["color"]["window"] if fg_color is None else self._check_color_type(fg_color)
|
||||
self._text_color = ThemeManager.theme["color"]["text"] if text_color is None else self._check_color_type(button_hover_color)
|
||||
self._button_fg_color = ThemeManager.theme["color"]["button"] if button_fg_color is None else self._check_color_type(button_fg_color)
|
||||
self._button_hover_color = ThemeManager.theme["color"]["button_hover"] if button_hover_color is None else self._check_color_type(button_hover_color)
|
||||
self._button_text_color = ThemeManager.theme["color"]["text"] if button_text_color is None else self._check_color_type(button_text_color)
|
||||
self._entry_fg_color = ThemeManager.theme["color"]["entry"] if entry_fg_color is None else self._check_color_type(entry_fg_color)
|
||||
self._entry_border_color = ThemeManager.theme["color"]["entry_border"] if entry_border_color is None else self._check_color_type(entry_border_color)
|
||||
self._entry_text_color = ThemeManager.theme["color"]["text"] if entry_text_color is None else self._check_color_type(entry_text_color)
|
||||
self._fg_color = ThemeManager.theme["CTkToplevel"]["fg_color"] if fg_color is None else self._check_color_type(fg_color)
|
||||
self._text_color = ThemeManager.theme["CTkLabel"]["text_color"] if text_color is None else self._check_color_type(button_hover_color)
|
||||
self._button_fg_color = ThemeManager.theme["CTkButton"]["fg_color"] if button_fg_color is None else self._check_color_type(button_fg_color)
|
||||
self._button_hover_color = ThemeManager.theme["CTkButton"]["hover_color"] if button_hover_color is None else self._check_color_type(button_hover_color)
|
||||
self._button_text_color = ThemeManager.theme["CTkButton"]["text_color"] if button_text_color is None else self._check_color_type(button_text_color)
|
||||
self._entry_fg_color = ThemeManager.theme["CTkEntry"]["fg_color"] if entry_fg_color is None else self._check_color_type(entry_fg_color)
|
||||
self._entry_border_color = ThemeManager.theme["CTkEntry"]["border_color"] if entry_border_color is None else self._check_color_type(entry_border_color)
|
||||
self._entry_text_color = ThemeManager.theme["CTkEntry"]["text_color"] if entry_text_color is None else self._check_color_type(entry_text_color)
|
||||
|
||||
self._user_input: Union[str, None] = None
|
||||
self._running: bool = False
|
||||
|
@ -55,7 +55,7 @@ class CTk(tkinter.Tk, CTkAppearanceModeBaseClass, CTkScalingBaseClass):
|
||||
|
||||
# set title and initial geometry
|
||||
self.title("CTk")
|
||||
self.geometry(f"{self._current_width}x{self._current_height}")
|
||||
# self.geometry(f"{self._current_width}x{self._current_height}")
|
||||
|
||||
self._state_before_windows_set_titlebar_color = None
|
||||
self._window_exists = False # indicates if the window is already shown through update() or mainloop() after init
|
||||
|
@ -2,6 +2,8 @@ import customtkinter
|
||||
|
||||
customtkinter.set_appearance_mode("dark")
|
||||
customtkinter.set_default_color_theme("blue")
|
||||
customtkinter.set_window_scaling(0.8)
|
||||
customtkinter.set_widget_scaling(0.8)
|
||||
|
||||
app = customtkinter.CTk()
|
||||
app.geometry("400x300")
|
||||
|
Loading…
Reference in New Issue
Block a user