提交 0f64d785 编写于 作者: 之一Yo's avatar 之一Yo

修复颜色对话框弹出时样式失效的问题

上级 70cde007
......@@ -63,6 +63,5 @@ class DialogInterface(GalleryInterface):
def showColorDialog(self):
w = ColorDialog(Qt.cyan, self.tr('Choose color'), self.window())
w.updateStyle()
w.colorChanged.connect(lambda c: print(c.name()))
w.exec()
\ No newline at end of file
......@@ -238,7 +238,7 @@ class ColorDialog(MaskDialogBase):
self.oldColorCard.move(288, self.newColorCard.geometry().bottom()+1)
self.brightSlider.move(0, 324)
self.editLabel.move(0, 381)
self.editLabel.move(0, 385)
self.redLineEdit.move(0, 426)
self.greenLineEdit.move(0, 470)
self.blueLineEdit.move(0, 515)
......@@ -320,6 +320,13 @@ class ColorDialog(MaskDialogBase):
self.setStyle(QApplication.style())
self.titleLabel.adjustSize()
self.editLabel.adjustSize()
self.redLabel.adjustSize()
self.greenLabel.adjustSize()
self.blueLabel.adjustSize()
def showEvent(self, e):
self.updateStyle()
super().showEvent(e)
def __connectSignalToSlot(self):
""" connect signal to slot """
......
......@@ -125,7 +125,6 @@ class CustomColorSettingCard(ExpandGroupSettingCard):
""" show color dialog """
w = ColorDialog(qconfig.get(self.configItem),
self.tr('Choose color'), self.window())
w.updateStyle()
w.colorChanged.connect(self.__onCustomColorChanged)
w.exec()
......
......@@ -289,7 +289,6 @@ class ColorPickerButton(QToolButton):
""" show color dialog """
w = ColorDialog(self.color, self.tr(
'Choose ')+self.title, self.window())
w.updateStyle()
w.colorChanged.connect(self.__onColorChanged)
w.exec()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册