[update] stylename active used to init combobox
This commit is contained in:
parent
c23fc0f303
commit
7027f9ca58
@ -711,6 +711,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
style = self._styles[stylename]
|
style = self._styles[stylename]
|
||||||
self._style = style
|
self._style = style
|
||||||
|
self._stylename = stylename
|
||||||
self.setStyleSheet(style['stylesheet'])
|
self.setStyleSheet(style['stylesheet'])
|
||||||
|
|
||||||
# colors for ref/test event
|
# colors for ref/test event
|
||||||
|
@ -3738,10 +3738,13 @@ class GraphicsTab(PropTab):
|
|||||||
|
|
||||||
def add_style_settings(self):
|
def add_style_settings(self):
|
||||||
styles = self.pylot_mainwindow._styles
|
styles = self.pylot_mainwindow._styles
|
||||||
|
active_stylename = self.pylot_mainwindow._stylename
|
||||||
label = QtGui.QLabel('Application style (might require Application restart):')
|
label = QtGui.QLabel('Application style (might require Application restart):')
|
||||||
self.style_cb = QComboBox()
|
self.style_cb = QComboBox()
|
||||||
for stylename, style in styles.items():
|
for stylename, style in styles.items():
|
||||||
self.style_cb.addItem(stylename, style)
|
self.style_cb.addItem(stylename, style)
|
||||||
|
index_current_style = self.style_cb.findText(active_stylename)
|
||||||
|
self.style_cb.setCurrentIndex(index_current_style)
|
||||||
self.main_layout.addWidget(label, 2, 0)
|
self.main_layout.addWidget(label, 2, 0)
|
||||||
self.main_layout.addWidget(self.style_cb, 2, 1)
|
self.main_layout.addWidget(self.style_cb, 2, 1)
|
||||||
self.style_cb.activated.connect(self.set_current_style)
|
self.style_cb.activated.connect(self.set_current_style)
|
||||||
|
Loading…
Reference in New Issue
Block a user