diff --git a/dist/DatabaseApp.exe b/dist/DatabaseApp.exe index da4aeb6..4155aa8 100644 Binary files a/dist/DatabaseApp.exe and b/dist/DatabaseApp.exe differ diff --git a/main.py b/main.py index 148db4e..8ed163e 100644 --- a/main.py +++ b/main.py @@ -39,9 +39,22 @@ class DatabaseApp(App): content_layout = BoxLayout(orientation='vertical', spacing=30, size_hint_y=None) content_layout.bind(minimum_height=content_layout.setter('height')) - # Title - title = Label(text='Database Search & Update', font_size=28, bold=True, size_hint_y=None, height=50) - content_layout.add_widget(title) + # Title row: title label + Exit button on the right + title_row = BoxLayout(orientation='horizontal', size_hint_y=None, height=50, spacing=15) + title = Label(text='Database Search & Update', font_size=28, bold=True) + title_row.add_widget(title) + exit_btn = Button( + text='Exit', + font_size=18, + bold=True, + background_color=(0.85, 0.1, 0.1, 1), + color=(1, 1, 1, 1), + size_hint_x=None, + width=110 + ) + exit_btn.bind(on_press=lambda x: self.stop()) + title_row.add_widget(exit_btn) + content_layout.add_widget(title_row) # Search section search_layout = GridLayout(cols=2, size_hint_y=None, height=100, spacing=15, row_force_default=True, row_default_height=45) @@ -105,8 +118,8 @@ class DatabaseApp(App): button_layout.add_widget(settings_btn) content_layout.add_widget(button_layout) - # Extra spacing between buttons and update frame - content_layout.add_widget(Label(size_hint_y=None, height=40)) + # Minimal spacing between buttons and update frame + content_layout.add_widget(Label(size_hint_y=None, height=10)) # Update frame (initially disabled) self.update_frame = BoxLayout(orientation='vertical', padding=15, spacing=15, size_hint_y=None, height=200) @@ -173,20 +186,6 @@ class DatabaseApp(App): root.add_widget(main_layout) - # Exit button — fixed to the bottom-right corner - exit_btn = Button( - text='Exit', - font_size=20, - bold=True, - background_color=(0.85, 0.1, 0.1, 1), - color=(1, 1, 1, 1), - size_hint=(None, None), - size=(120, 55), - pos_hint={'right': 1, 'y': 0} - ) - exit_btn.bind(on_press=lambda x: self.stop()) - root.add_widget(exit_btn) - # Init DB and load data in background so the UI appears immediately def _init_db(dt): def _do():