Skip to content

Commit

Permalink
A touch more anti-flicker
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrusnetwork committed Aug 21, 2024
1 parent 859cd45 commit 4c2eab7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions hydrus/client/gui/pages/ClientGUIManagementPanels.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ def CleanBeforeDestroy( self ):
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()

Expand Down
14 changes: 7 additions & 7 deletions hydrus/client/gui/pages/ClientGUIPages.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def __init__( self, parent, controller, management_controller: ClientGUIManageme

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 )
Expand All @@ -481,12 +481,6 @@ def __init__( self, parent, controller, management_controller: ClientGUIManageme

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 )
Expand All @@ -503,6 +497,12 @@ def __init__( self, parent, controller, management_controller: ClientGUIManageme
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 )

Expand Down

0 comments on commit 4c2eab7

Please sign in to comment.