mirror of
https://github.com/Syncplay/syncplay
synced 2025-02-19 12:36:51 +00:00
Fix window height where there is a notification bocx
This commit is contained in:
parent
da1b2894bf
commit
8f589e6278
@ -68,7 +68,10 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.playerargsLabel.hide()
|
self.playerargsLabel.hide()
|
||||||
self.saveMoreState(False)
|
self.saveMoreState(False)
|
||||||
self.stackedLayout.setCurrentIndex(0)
|
self.stackedLayout.setCurrentIndex(0)
|
||||||
self.stackedFrame.setFixedHeight(self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+3)
|
newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+3
|
||||||
|
if self.errorLabel.isVisible():
|
||||||
|
newHeight +=self.errorLabel.height()+3
|
||||||
|
self.stackedFrame.setFixedHeight(newHeight)
|
||||||
self.adjustSize()
|
self.adjustSize()
|
||||||
self.setFixedSize(self.sizeHint())
|
self.setFixedSize(self.sizeHint())
|
||||||
self.moreToggling = False
|
self.moreToggling = False
|
||||||
@ -410,6 +413,7 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
error = self.error
|
error = self.error
|
||||||
if self.datacleared == True:
|
if self.datacleared == True:
|
||||||
error = constants.ERROR_MESSAGE_MARKER + "{}".format(getMessage("gui-data-cleared-notification"))
|
error = constants.ERROR_MESSAGE_MARKER + "{}".format(getMessage("gui-data-cleared-notification"))
|
||||||
|
self.error = error
|
||||||
if config['host'] == None:
|
if config['host'] == None:
|
||||||
host = ""
|
host = ""
|
||||||
elif ":" in config['host']:
|
elif ":" in config['host']:
|
||||||
@ -522,7 +526,6 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.errorLabel.setStyleSheet(constants.STYLE_SUCCESSLABEL)
|
self.errorLabel.setStyleSheet(constants.STYLE_SUCCESSLABEL)
|
||||||
self.errorLabel.setText(error)
|
self.errorLabel.setText(error)
|
||||||
self.errorLabel.setAlignment(Qt.AlignCenter)
|
self.errorLabel.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
self.basicOptionsLayout.addWidget(self.errorLabel, 0, 0)
|
self.basicOptionsLayout.addWidget(self.errorLabel, 0, 0)
|
||||||
self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height())
|
self.connectionSettingsGroup.setMaximumHeight(self.connectionSettingsGroup.minimumSizeHint().height())
|
||||||
self.basicOptionsLayout.setAlignment(Qt.AlignTop)
|
self.basicOptionsLayout.setAlignment(Qt.AlignTop)
|
||||||
@ -960,7 +963,10 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.resetButton.hide()
|
self.resetButton.hide()
|
||||||
self.playerargsTextbox.hide()
|
self.playerargsTextbox.hide()
|
||||||
self.playerargsLabel.hide()
|
self.playerargsLabel.hide()
|
||||||
self.stackedFrame.setFixedHeight(self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+3)
|
newHeight = self.connectionSettingsGroup.minimumSizeHint().height()+self.mediaplayerSettingsGroup.minimumSizeHint().height()+self.bottomButtonFrame.minimumSizeHint().height()+3
|
||||||
|
if self.error:
|
||||||
|
newHeight +=self.errorLabel.height()+3
|
||||||
|
self.stackedFrame.setFixedHeight(newHeight)
|
||||||
else:
|
else:
|
||||||
self.showmoreCheckbox.setChecked(True)
|
self.showmoreCheckbox.setChecked(True)
|
||||||
self.tabListWidget.setCurrentRow(0)
|
self.tabListWidget.setCurrentRow(0)
|
||||||
@ -976,4 +982,4 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
if constants.SHOW_TOOLTIPS:
|
if constants.SHOW_TOOLTIPS:
|
||||||
self.processWidget(self, lambda w: self.loadTooltips(w))
|
self.processWidget(self, lambda w: self.loadTooltips(w))
|
||||||
self.processWidget(self, lambda w: self.loadValues(w))
|
self.processWidget(self, lambda w: self.loadValues(w))
|
||||||
self.processWidget(self, lambda w: self.connectChildren(w))
|
self.processWidget(self, lambda w: self.connectChildren(w))
|
Loading…
Reference in New Issue
Block a user