Fix layout margins and z-order of some dialogs (#834)
* Fix layout margins on paged dialogs * Make sure non-modal dialogs are only shown once and are on top
This commit is contained in:
committed by
GitHub
parent
732450e163
commit
b517276156
+5
-5
@@ -393,11 +393,11 @@ class PagedDialog(QDialog):
|
||||
self._outerBox.addLayout(self._buttonBox)
|
||||
|
||||
# Default Margins
|
||||
qM = self._outerBox.contentsMargins()
|
||||
mL = qM.left()
|
||||
mR = qM.right()
|
||||
mT = qM.top()
|
||||
mB = qM.bottom()
|
||||
thisStyle = self.style()
|
||||
mL = thisStyle.pixelMetric(QStyle.PM_LayoutLeftMargin)
|
||||
mR = thisStyle.pixelMetric(QStyle.PM_LayoutRightMargin)
|
||||
mT = thisStyle.pixelMetric(QStyle.PM_LayoutLeftMargin)
|
||||
mB = thisStyle.pixelMetric(QStyle.PM_LayoutBottomMargin)
|
||||
|
||||
# Set Margins
|
||||
self.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
+12
-2
@@ -1002,9 +1002,13 @@ class GuiMain(QMainWindow):
|
||||
|
||||
self.treeView.flushTreeOrder()
|
||||
|
||||
dlgDetails = GuiProjectDetails(self)
|
||||
dlgDetails = getGuiItem("GuiProjectDetails")
|
||||
if dlgDetails is None:
|
||||
dlgDetails = GuiProjectDetails(self)
|
||||
|
||||
dlgDetails.setModal(False)
|
||||
dlgDetails.show()
|
||||
dlgDetails.raise_()
|
||||
|
||||
return
|
||||
|
||||
@@ -1021,6 +1025,7 @@ class GuiMain(QMainWindow):
|
||||
|
||||
dlgBuild.setModal(False)
|
||||
dlgBuild.show()
|
||||
dlgBuild.raise_()
|
||||
qApp.processEvents()
|
||||
dlgBuild.viewCachedDoc()
|
||||
|
||||
@@ -1055,6 +1060,7 @@ class GuiMain(QMainWindow):
|
||||
|
||||
dlgStats.setModal(False)
|
||||
dlgStats.show()
|
||||
dlgStats.raise_()
|
||||
qApp.processEvents()
|
||||
dlgStats.populateGUI()
|
||||
|
||||
@@ -1063,9 +1069,13 @@ class GuiMain(QMainWindow):
|
||||
def showAboutNWDialog(self, showNotes=False):
|
||||
"""Show the about dialog for novelWriter.
|
||||
"""
|
||||
dlgAbout = GuiAbout(self)
|
||||
dlgAbout = getGuiItem("GuiAbout")
|
||||
if dlgAbout is None:
|
||||
dlgAbout = GuiAbout(self)
|
||||
|
||||
dlgAbout.setModal(True)
|
||||
dlgAbout.show()
|
||||
dlgAbout.raise_()
|
||||
qApp.processEvents()
|
||||
dlgAbout.populateGUI()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user