From 465f9f962890b4863a769f2c777526191dd6c752 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 15 Oct 2023 11:32:38 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[bugfix]=20Main=20Window:=20UI=E5=B4=A9?= =?UTF-8?q?=E5=A3=8A=E4=BF=AE=E6=AD=A3=20Windows=E6=9C=AC=E4=BD=93?= =?UTF-8?q?=E3=81=A7=E3=82=B9=E3=82=B1=E3=83=BC=E3=83=AA=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=ABUI=E3=81=8C=E5=B4=A9=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82DPI?= =?UTF-8?q?=E3=82=92=E5=9B=BA=E5=AE=9A=E3=81=99=E3=82=8B=E3=81=9F=E3=82=81?= =?UTF-8?q?=E3=81=ABctypes=E3=82=92=E4=BD=BF=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E3=80=81requirements.txt=E3=81=AB?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 +++ requirements.txt | 3 ++- view.py | 1 - vrct_gui/_changeMainWindowWidgetsStatus.py | 8 +++----- .../widgets/_create_sidebar/createSidebarFeatures.py | 11 +++-------- vrct_gui/main_window/widgets/create_sidebar.py | 7 +++---- vrct_gui/ui_managers/UiScalingManager.py | 8 ++++---- 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/main.py b/main.py index b3801625..12994131 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,6 @@ +import ctypes +ctypes.windll.shcore.SetProcessDpiAwareness(1) + from vrct_gui.splash_window import SplashWindow splash = SplashWindow() splash.showSplash() diff --git a/requirements.txt b/requirements.txt index a399733d..339ae06d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ customtkinter == 5.2.0 deepl == 1.15.0 flashtext == 2.7 pyyaml == 6.0.1 -python-i18n == 0.3.9 \ No newline at end of file +python-i18n == 0.3.9 +ctypes \ No newline at end of file diff --git a/view.py b/view.py index ba07425a..c3aea143 100644 --- a/view.py +++ b/view.py @@ -38,7 +38,6 @@ class View(): self.settings.main = SimpleNamespace( ctm=all_ctm.main, uism=all_uism.main, - COMPACT_MODE_ICON_SIZE=0, **common_args ) diff --git a/vrct_gui/_changeMainWindowWidgetsStatus.py b/vrct_gui/_changeMainWindowWidgetsStatus.py index dc303094..4910797d 100644 --- a/vrct_gui/_changeMainWindowWidgetsStatus.py +++ b/vrct_gui/_changeMainWindowWidgetsStatus.py @@ -1,8 +1,6 @@ from customtkinter import CTkImage def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, target_names): - COMPACT_MODE_ICON_SIZE_TUPLES = (settings.COMPACT_MODE_ICON_SIZE, settings.COMPACT_MODE_ICON_SIZE) - if target_names == "All": target_names = ["translation_switch", "transcription_send_switch", "transcription_receive_switch", "foreground_switch", "quick_language_settings", "config_button", "minimize_sidebar_button", "entry_message_box"] @@ -32,7 +30,7 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta widget_selected_mark.configure(fg_color=settings.ctm.SF__SELECTED_MARK_ACTIVE_BG_COLOR) icon_file = icon_name - image = CTkImage(icon_file, size=COMPACT_MODE_ICON_SIZE_TUPLES) + image = CTkImage(icon_file, size=settings.uism.SF__COMPACT_MODE_IMAGE_SIZE) widget_compact_mode_icon.configure(image=image) @@ -109,12 +107,12 @@ def _changeMainWindowWidgetsStatus(vrct_gui, settings, view_variable, status, ta if status == "disabled": vrct_gui.sidebar_config_button_wrapper.configure(cursor="") vrct_gui.sidebar_config_button.configure( - image=CTkImage(settings.image_file.CONFIGURATION_ICON_DISABLED, size=COMPACT_MODE_ICON_SIZE_TUPLES), + image=CTkImage(settings.image_file.CONFIGURATION_ICON_DISABLED, size=settings.uism.SF__COMPACT_MODE_IMAGE_SIZE), ) elif status == "normal": vrct_gui.sidebar_config_button_wrapper.configure(cursor="hand2") vrct_gui.sidebar_config_button.configure( - image=CTkImage(settings.image_file.CONFIGURATION_ICON, size=COMPACT_MODE_ICON_SIZE_TUPLES), + image=CTkImage(settings.image_file.CONFIGURATION_ICON, size=settings.uism.SF__COMPACT_MODE_IMAGE_SIZE), ) diff --git a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarFeatures.py b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarFeatures.py index 0f8314f0..ad5e09a5 100644 --- a/vrct_gui/main_window/widgets/_create_sidebar/createSidebarFeatures.py +++ b/vrct_gui/main_window/widgets/_create_sidebar/createSidebarFeatures.py @@ -217,11 +217,6 @@ def createSidebarFeatures(settings, main_window, view_variable): setattr(main_window, switch_box_attr_name, switch_box_widget) - if settings.COMPACT_MODE_ICON_SIZE == 0: - label_widget.grid(row=row, column=0, pady=settings.uism.SF__LABELS_IPADY, padx=(settings.uism.SF__LABEL_LEFT_PAD,0), sticky="ew") - settings.COMPACT_MODE_ICON_SIZE = int(getLatestHeight(frame_widget) - settings.uism.SF__COMPACT_MODE_ICON_PADY*2) - label_widget.grid_remove() - # for compact mode compact_mode_icon_widget = CTkLabel( @@ -229,7 +224,7 @@ def createSidebarFeatures(settings, main_window, view_variable): text=None, height=0, corner_radius=0, - image=CTkImage((icon_file),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE)), + image=CTkImage(icon_file, size=settings.uism.SF__COMPACT_MODE_IMAGE_SIZE), ) setattr(main_window, compact_mode_icon_attr_name, compact_mode_icon_widget) @@ -244,11 +239,11 @@ def createSidebarFeatures(settings, main_window, view_variable): # Arrange - compact_mode_icon_widget.grid(row=row, column=0, pady=settings.uism.SF__COMPACT_MODE_ICON_PADY) + compact_mode_icon_widget.grid(row=row, column=0, padx=settings.uism.SF__COMPACT_MODE_ICON_PADX, pady=settings.uism.SF__COMPACT_MODE_ICON_PADY) selected_mark_widget.place(relx=-1, rely=0.5, relheight=0.75, anchor="center") label_widget.grid(row=row, column=0, pady=settings.uism.SF__LABELS_IPADY, padx=(settings.uism.SF__LABEL_LEFT_PAD,0), sticky="ew") - switch_box_widget.grid(row=row, column=0, padx=(0,settings.uism.SF__SWITCH_BOX_RIGHT_PAD), sticky="e") + switch_box_widget.grid(row=row, column=1, padx=settings.uism.SF__SWITCH_BOX_PADX, sticky="e") # Unbind the event "" originally set up by the widget to manually control it. diff --git a/vrct_gui/main_window/widgets/create_sidebar.py b/vrct_gui/main_window/widgets/create_sidebar.py index 763472a0..6e7fe42f 100644 --- a/vrct_gui/main_window/widgets/create_sidebar.py +++ b/vrct_gui/main_window/widgets/create_sidebar.py @@ -16,8 +16,8 @@ def createSidebar(settings, main_window, view_variable): main_window.sidebar_compact_mode_bg_container = CTkFrame(main_window.sidebar_bg_container_wrapper, corner_radius=0, fg_color=settings.ctm.SIDEBAR_BG_COLOR, width=0, height=0) - main_window.sidebar_bg_container.grid_columnconfigure(0, weight=0, minsize=settings.uism.SIDEBAR_MIN_WIDTH) - main_window.sidebar_compact_mode_bg_container.grid_columnconfigure(0, weight=0, minsize=settings.uism.COMPACT_MODE_SIDEBAR_MIN_WIDTH) + main_window.sidebar_bg_container.grid_columnconfigure(0, weight=1) + main_window.sidebar_compact_mode_bg_container.grid_columnconfigure(0, weight=1) createSidebarFeatures(settings, main_window, view_variable) @@ -45,12 +45,11 @@ def createSidebar(settings, main_window, view_variable): main_window.sidebar_config_button_wrapper.grid_columnconfigure(0, weight=1) - settings.uism.CONFIG_BUTTON_PADX = 0 main_window.sidebar_config_button = CTkLabel( main_window.sidebar_config_button_wrapper, text=None, height=0, - image=CTkImage((settings.image_file.CONFIGURATION_ICON),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE)) + image=CTkImage(settings.image_file.CONFIGURATION_ICON, size=settings.uism.SIDEBAR_CONFIG_BUTTON_IMAGE_SIZE) ) main_window.sidebar_config_button.grid(row=0, column=0, padx=0, pady=settings.uism.SIDEBAR_CONFIG_BUTTON_IPADY) diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 5159bb81..a7e581ce 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -54,9 +54,6 @@ class UiScalingManager(): # Sidebar - self.main.SIDEBAR_MIN_WIDTH = self._calculateUiSize(230) - self.main.COMPACT_MODE_SIDEBAR_MIN_WIDTH = self._calculateUiSize(60) - # Sidebar Features self.main.SF__LOGO_MAX_SIZE = self._calculateUiSize(120) self.main.SF__LOGO_PADY = (self._calculateUiSize(12),self._calculateUiSize(8)) @@ -64,10 +61,12 @@ class UiScalingManager(): self.main.SF__LABELS_IPADY = self._calculateUiSize(16) self.main.SF__COMPACT_MODE_ICON_PADY = self.main.SF__LABELS_IPADY + self.main.SF__COMPACT_MODE_ICON_PADX = self.main.SF__COMPACT_MODE_ICON_PADY self.main.SF__LABEL_LEFT_PAD = self._calculateUiSize(20) self.main.SF__LABEL_FONT_SIZE = self._calculateUiSize(16) + self.main.SF__COMPACT_MODE_IMAGE_SIZE = (self._calculateUiSize(20), self._calculateUiSize(20)) - self.main.SF__SWITCH_BOX_RIGHT_PAD = self._calculateUiSize(10) + self.main.SF__SWITCH_BOX_PADX = (self.main.SF__LABEL_LEFT_PAD, self._calculateUiSize(10)) self.main.SF__SWITCH_BOX_WIDTH = self._calculateUiSize(40) self.main.SF__SWITCH_BOX_HEIGHT = self._calculateUiSize(16) @@ -98,6 +97,7 @@ class UiScalingManager(): self.main.SLS__BOX_TOP_PADY = self._calculateUiSize(16) self.main.SIDEBAR_CONFIG_BUTTON_CORNER_RADIUS = self._calculateUiSize(6) + self.main.SIDEBAR_CONFIG_BUTTON_IMAGE_SIZE = self.main.SF__COMPACT_MODE_IMAGE_SIZE self.main.SIDEBAR_CONFIG_BUTTON_PADX = self._calculateUiSize(10) self.main.SIDEBAR_CONFIG_BUTTON_PADY = self._calculateUiSize(10) self.main.SIDEBAR_CONFIG_BUTTON_IPADY = self._calculateUiSize(8) From 16cac0d557dbae5731663f2fcb96d1a14fbca9a3 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 16 Oct 2023 10:09:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[bugfix]=20Main=20Window:=20Main=20Window?= =?UTF-8?q?=20Cover:=20UI=E5=B4=A9=E5=A3=8A=E4=BF=AE=E6=AD=A3=E7=B6=9A?= =?UTF-8?q?=E3=81=8D=E3=80=82SetProcessDpiAwareness=201=20->=200=20[bugfix?= =?UTF-8?q?]=20=E8=A8=AD=E5=AE=9A=E7=94=BB=E9=9D=A2=E3=82=92=E9=96=8B?= =?UTF-8?q?=E3=81=84=E3=81=9F=E6=99=82=E3=81=AB=E3=82=AB=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=99=E3=82=8BWindow=E3=81=8C=E3=81=9A=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=80=81=E3=83=A1=E3=82=A4=E3=83=B3=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=82=92=E7=A7=BB=E5=8B=95=E3=81=97=E3=81=9F=E6=99=82=E3=81=AB?= =?UTF-8?q?=E6=AF=8E=E5=9B=9Elift=EF=BC=88=E6=9C=80=E5=89=8D=E9=9D=A2?= =?UTF-8?q?=E3=81=AB=E8=A1=A8=E7=A4=BA=EF=BC=89=E3=81=99=E3=82=8B=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E3=82=92=E5=89=8A=E9=99=A4=E3=80=82=20[Update]=20Main?= =?UTF-8?q?=20Window:=20=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=AE=E5=B9=85=E3=82=92=E7=B8=AE?= =?UTF-8?q?=E3=82=81=E3=81=9F=E6=99=82=E3=81=AB=E3=80=81=E3=83=86=E3=82=AD?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=9C=E3=83=83=E3=82=AF=E3=82=B9=E3=81=AE?= =?UTF-8?q?=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=8C=E4=B8=80=E5=AE=9A=E4=BB=A5?= =?UTF-8?q?=E4=B8=8A=E7=B8=AE=E3=81=BE=E3=81=9A=E3=80=81=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=81=8C=E6=8A=98=E3=82=8A=E8=BF=94=E3=81=95=E3=82=8C=E3=81=AA?= =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81=E6=8A=98?= =?UTF-8?q?=E3=82=8A=E8=BF=94=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E6=94=B9=E5=96=84=E3=80=82=E3=81=9D=E3=82=8C=E3=81=AB?= =?UTF-8?q?=E3=82=88=E3=82=8A=E5=B9=85=E5=9B=BA=E5=AE=9A=E3=82=92=E5=A4=96?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=81=AE=E3=81=A7=E3=80=81=E8=B5=B7=E5=8B=95?= =?UTF-8?q?=E6=99=82=E3=81=ABgeometry=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=AA=E3=81=A9=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B?= =?UTF-8?q?=E3=80=82=20=E2=80=BB=E4=B8=8A=E8=A8=98=E7=9B=B8=E4=BA=92?= =?UTF-8?q?=E3=81=AB=E5=BD=B1=E9=9F=BF=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B?= =?UTF-8?q?=E3=81=9F=E3=82=81=E3=81=BE=E3=81=A8=E3=82=81=E3=81=A6=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E3=81=97=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- .../main_window/createMainWindowWidgets.py | 12 +++++++++--- .../main_window/widgets/create_sidebar.py | 6 +++--- vrct_gui/ui_managers/UiScalingManager.py | 1 + vrct_gui/vrct_gui.py | 19 +++++-------------- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/main.py b/main.py index 12994131..2c68e5d2 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,5 @@ import ctypes -ctypes.windll.shcore.SetProcessDpiAwareness(1) +ctypes.windll.shcore.SetProcessDpiAwareness(0) from vrct_gui.splash_window import SplashWindow splash = SplashWindow() diff --git a/vrct_gui/main_window/createMainWindowWidgets.py b/vrct_gui/main_window/createMainWindowWidgets.py index c42ba7e5..94498bfa 100644 --- a/vrct_gui/main_window/createMainWindowWidgets.py +++ b/vrct_gui/main_window/createMainWindowWidgets.py @@ -11,17 +11,23 @@ def createMainWindowWidgets(vrct_gui, settings, view_variable): vrct_gui.iconbitmap(getImagePath("vrct_logo_mark_black.ico")) vrct_gui.title("VRCT") - vrct_gui.minsize(200, 200) + # vrct_gui.minsize(200, 200) # Main Container - vrct_gui.grid_columnconfigure(1, weight=1, minsize=settings.uism.MAIN_AREA_MIN_WIDTH) + vrct_gui.grid_columnconfigure(0, weight=1) + vrct_gui.grid_rowconfigure(0, weight=1) + # vrct_gui.grid_columnconfigure(0, weight=1, minsize=settings.uism.MAIN_AREA_MIN_WIDTH) vrct_gui.configure(fg_color="#ff7f50") + vrct_gui.toplevel_wrapper = CTkFrame(vrct_gui, corner_radius=0, fg_color=settings.ctm.MAIN_BG_COLOR, width=0, height=0) + vrct_gui.toplevel_wrapper.grid(row=0, column=0, sticky="nsew") + vrct_gui.toplevel_wrapper.grid_columnconfigure(1, weight=1) + # Main Container - vrct_gui.main_bg_container = CTkFrame(vrct_gui, corner_radius=0, fg_color=settings.ctm.MAIN_BG_COLOR, width=0, height=0) + vrct_gui.main_bg_container = CTkFrame(vrct_gui.toplevel_wrapper, corner_radius=0, fg_color=settings.ctm.MAIN_BG_COLOR, width=0, height=0) vrct_gui.main_bg_container.grid(row=0, column=1, sticky="nsew") diff --git a/vrct_gui/main_window/widgets/create_sidebar.py b/vrct_gui/main_window/widgets/create_sidebar.py index 6e7fe42f..ac6efe14 100644 --- a/vrct_gui/main_window/widgets/create_sidebar.py +++ b/vrct_gui/main_window/widgets/create_sidebar.py @@ -6,9 +6,9 @@ from ._create_sidebar import createSidebarFeatures, createSidebarLanguagesSettin def createSidebar(settings, main_window, view_variable): # Side Bar Container - main_window.grid_rowconfigure(0, weight=1) + main_window.toplevel_wrapper.grid_rowconfigure(0, weight=1) - main_window.sidebar_bg_container_wrapper = CTkFrame(main_window, corner_radius=0, fg_color=settings.ctm.SIDEBAR_BG_COLOR, width=0, height=0) + main_window.sidebar_bg_container_wrapper = CTkFrame(main_window.toplevel_wrapper, corner_radius=0, fg_color=settings.ctm.SIDEBAR_BG_COLOR, width=0, height=0) main_window.sidebar_bg_container_wrapper.grid(row=0, column=0, sticky="nsew") @@ -16,7 +16,7 @@ def createSidebar(settings, main_window, view_variable): main_window.sidebar_compact_mode_bg_container = CTkFrame(main_window.sidebar_bg_container_wrapper, corner_radius=0, fg_color=settings.ctm.SIDEBAR_BG_COLOR, width=0, height=0) - main_window.sidebar_bg_container.grid_columnconfigure(0, weight=1) + main_window.sidebar_bg_container.grid_columnconfigure(0, weight=1, minsize=settings.uism.SIDEBAR_MIN_WIDTH) main_window.sidebar_compact_mode_bg_container.grid_columnconfigure(0, weight=1) diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index a7e581ce..56d5cafd 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -29,6 +29,7 @@ class UiScalingManager(): # Main self.main.MAIN_AREA_MIN_WIDTH = self._calculateUiSize(640) + self.main.SIDEBAR_MIN_WIDTH = self._calculateUiSize(230) self.main.TEXTBOX_PADX = self._calculateUiSize(16) self.main.TEXTBOX_CORNER_RADIUS = self._calculateUiSize(6) diff --git a/vrct_gui/vrct_gui.py b/vrct_gui/vrct_gui.py index fae93026..ae3b8fcb 100644 --- a/vrct_gui/vrct_gui.py +++ b/vrct_gui/vrct_gui.py @@ -19,7 +19,6 @@ class VRCT_GUI(CTk): def __init__(self): super().__init__() self.withdraw() - self.adjusted_event=None self.is_config_window_already_opened_once=False self.BIND_CONFIGURE_ADJUSTED_GEOMETRY_FUNC_ID=None self.BIND_FOCUS_IN_MODAL_WINDOW_LIFT_CONFIG_WINDOW_FUNC_ID=None @@ -45,6 +44,10 @@ class VRCT_GUI(CTk): def _showGUI(self): self.attributes("-alpha", 0) self.deiconify() + self.geometry("{}x{}".format( + self.settings.main.uism.MAIN_AREA_MIN_WIDTH + self.settings.main.uism.SIDEBAR_MIN_WIDTH, + self.winfo_height() + )) setGeometryToCenterOfScreen(root_widget=self) if self._view_variable.IS_MAIN_WINDOW_SIDEBAR_COMPACT_MODE is True: self._enableMainWindowSidebarCompactMode() @@ -94,7 +97,7 @@ class VRCT_GUI(CTk): ) self.main_window_cover = _CreateWindowCover( - attach_window=self, + attach_window=self.toplevel_wrapper, settings=self.settings.main_window_cover, view_variable=self._view_variable ) @@ -266,18 +269,6 @@ class VRCT_GUI(CTk): self.main_window_cover.geometry("{}x{}+{}+{}".format(width_new, height_new, x_pos, y_pos)) self.main_window_cover.lift() - if self.adjusted_event == str(e): - self.after(150, lambda: self.config_window.lift()) - elif self.adjusted_event is None: - self.after(150, lambda: self.config_window.lift()) - else: - pass - - self.config_window.focus_set() - - if e is not None: - self.adjusted_event=str(e) - def _showErrorMessage(self, target_widget): self.error_message_window.show(target_widget=target_widget)