diff --git a/hydrus/client/gui/pages/ClientGUIManagementPanels.py b/hydrus/client/gui/pages/ClientGUIManagementPanels.py index 66d1766f..d520cd5f 100644 --- a/hydrus/client/gui/pages/ClientGUIManagementPanels.py +++ b/hydrus/client/gui/pages/ClientGUIManagementPanels.py @@ -351,9 +351,9 @@ class ManagementPanel( QW.QScrollArea ): pass - def GetDefaultEmptyMediaPanel( self ) -> ClientGUIResults.MediaPanel: + def GetDefaultEmptyMediaPanel( self, win: QW.QWidget ) -> ClientGUIResults.MediaPanel: - panel = ClientGUIResults.MediaPanelThumbnails( self._page, self._page_key, self._management_controller, [] ) + panel = ClientGUIResults.MediaPanelThumbnails( win, self._page_key, self._management_controller, [] ) status = self._GetDefaultEmptyPageStatusOverride() diff --git a/hydrus/client/gui/pages/ClientGUIPages.py b/hydrus/client/gui/pages/ClientGUIPages.py index 3f327ed8..cf9d21c7 100644 --- a/hydrus/client/gui/pages/ClientGUIPages.py +++ b/hydrus/client/gui/pages/ClientGUIPages.py @@ -471,7 +471,7 @@ class Page( QW.QWidget ): self._management_panel.locationChanged.connect( self._preview_canvas.SetLocationContext ) - self._media_panel = self._management_panel.GetDefaultEmptyMediaPanel() + self._media_panel = self._management_panel.GetDefaultEmptyMediaPanel( self._management_media_split ) self._management_media_split.addWidget( self._search_preview_split ) self._management_media_split.addWidget( self._media_panel ) @@ -481,12 +481,6 @@ class Page( QW.QWidget ): vbox = QP.VBoxLayout( margin = 0 ) - QP.AddToLayout( vbox, self._management_media_split, CC.FLAGS_EXPAND_SIZER_BOTH_WAYS ) - - self.setLayout( vbox ) - - vbox = QP.VBoxLayout( margin = 0 ) - QP.AddToLayout( vbox, self._preview_canvas, CC.FLAGS_EXPAND_SIZER_BOTH_WAYS ) self._preview_panel.setLayout( vbox ) @@ -503,6 +497,12 @@ class Page( QW.QWidget ): self._search_preview_split.setStretchFactor( 0, 1 ) self._search_preview_split.setStretchFactor( 1, 0 ) + vbox = QP.VBoxLayout( margin = 0 ) + + QP.AddToLayout( vbox, self._management_media_split, CC.FLAGS_EXPAND_SIZER_BOTH_WAYS ) + + self.setLayout( vbox ) + self._handle_event_filter = QP.WidgetEventFilter( self._management_media_split.handle( 1 ) ) self._handle_event_filter.EVT_LEFT_DCLICK( self.EventUnsplit )