A touch more anti-flicker

This commit is contained in:
Hydrus Network Developer 2024-08-21 15:24:35 -05:00
parent 859cd4580c
commit 4c2eab727e
No known key found for this signature in database
GPG Key ID: 76249F053212133C
2 changed files with 9 additions and 9 deletions

View File

@ -351,9 +351,9 @@ class ManagementPanel( QW.QScrollArea ):
pass 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() status = self._GetDefaultEmptyPageStatusOverride()

View File

@ -471,7 +471,7 @@ class Page( QW.QWidget ):
self._management_panel.locationChanged.connect( self._preview_canvas.SetLocationContext ) 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._search_preview_split )
self._management_media_split.addWidget( self._media_panel ) self._management_media_split.addWidget( self._media_panel )
@ -481,12 +481,6 @@ class Page( QW.QWidget ):
vbox = QP.VBoxLayout( margin = 0 ) 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 ) QP.AddToLayout( vbox, self._preview_canvas, CC.FLAGS_EXPAND_SIZER_BOTH_WAYS )
self._preview_panel.setLayout( vbox ) 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( 0, 1 )
self._search_preview_split.setStretchFactor( 1, 0 ) 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 = QP.WidgetEventFilter( self._management_media_split.handle( 1 ) )
self._handle_event_filter.EVT_LEFT_DCLICK( self.EventUnsplit ) self._handle_event_filter.EVT_LEFT_DCLICK( self.EventUnsplit )