mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fix title bar toggling on/off when dialog
This commit is contained in:
parent
1937120ad7
commit
9795f14176
@ -37,23 +37,23 @@ class DetailsDialog(QDockWidget):
|
|||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
self._shown_once = True
|
self._shown_once = True
|
||||||
if not self.isVisible():
|
|
||||||
super().show()
|
super().show()
|
||||||
self.update_options()
|
self.update_options()
|
||||||
|
|
||||||
def update_options(self):
|
def update_options(self):
|
||||||
# This disables the title bar (if we had not set one before already)
|
# This disables the title bar (if we had not set one before already)
|
||||||
# essentially making it a simple floating window, not dockable anymore
|
# essentially making it a simple floating window, not dockable anymore
|
||||||
if not self.app.prefs.details_dialog_titlebar_enabled \
|
if not self.app.prefs.details_dialog_titlebar_enabled:
|
||||||
and not self.titleBarWidget():
|
if not self.titleBarWidget(): # default title bar
|
||||||
self.setTitleBarWidget(QWidget())
|
self.setTitleBarWidget(QWidget()) # disables title bar
|
||||||
# Windows (and MacOS?) users cannot move a floating window which
|
# Windows (and MacOS?) users cannot move a floating window which
|
||||||
# has not native decoration so we force it to dock for now
|
# has not native decoration so we force it to dock for now
|
||||||
if not ISLINUX:
|
if not ISLINUX:
|
||||||
self.setFloating(False)
|
self.setFloating(False)
|
||||||
elif self.titleBarWidget() is not None:
|
elif self.titleBarWidget() is not None: # title bar is disabled
|
||||||
# resets to the default title bar
|
self.setTitleBarWidget(None) # resets to the default title bar
|
||||||
self.setTitleBarWidget(None)
|
elif not self.titleBarWidget() and not self.app.prefs.details_dialog_titlebar_enabled:
|
||||||
|
self.setTitleBarWidget(QWidget())
|
||||||
|
|
||||||
features = self.features()
|
features = self.features()
|
||||||
if self.app.prefs.details_dialog_vertical_titlebar:
|
if self.app.prefs.details_dialog_vertical_titlebar:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user