pyqt5 fixes - menu and smileys
This commit is contained in:
parent
142255ccc8
commit
adf6cefd1f
2 changed files with 7 additions and 5 deletions
|
@ -153,7 +153,7 @@ class SmileyWindow(QtWidgets.QWidget):
|
|||
for i in range(self.page_count): # buttons with smileys
|
||||
elem = QtWidgets.QRadioButton(self)
|
||||
elem.setGeometry(QtCore.QRect(i * 20 + 5, 180, 20, 20))
|
||||
elem.clicked.connect(lambda i=i: self.checked(i))
|
||||
elem.clicked.connect(lambda c, t=i: self.checked(t))
|
||||
self.radio.append(elem)
|
||||
width = max(self.page_count * 20 + 30, (self.page_size + 5) * 8 // 10)
|
||||
self.setMaximumSize(width, 200)
|
||||
|
@ -162,7 +162,7 @@ class SmileyWindow(QtWidgets.QWidget):
|
|||
for i in range(self.page_size): # pages - radio buttons
|
||||
b = QtWidgets.QPushButton(self)
|
||||
b.setGeometry(QtCore.QRect((i // 8) * 20 + 5, (i % 8) * 20, 20, 20))
|
||||
b.clicked.connect(lambda i=i: self.clicked(i))
|
||||
b.clicked.connect(lambda c, t=i: self.clicked(t))
|
||||
self.buttons.append(b)
|
||||
self.checked(0)
|
||||
|
||||
|
|
|
@ -705,7 +705,7 @@ class InterfaceSettings(CenteredWidget):
|
|||
settings['theme'] = str(self.themeSelect.currentText())
|
||||
try:
|
||||
theme = settings['theme']
|
||||
app = QtGui.QApplication.instance()
|
||||
app = QtWidgets.QApplication.instance()
|
||||
with open(curr_directory() + settings.built_in_themes()[theme]) as fl:
|
||||
style = fl.read()
|
||||
app.setStyleSheet(style)
|
||||
|
@ -846,9 +846,11 @@ class VideoSettings(CenteredWidget):
|
|||
self.devices.append(i)
|
||||
self.frame_max_sizes.append((width, height))
|
||||
self.input.addItem('Device #' + str(i))
|
||||
index = self.devices.index(settings.video['device'])
|
||||
if index + 1:
|
||||
try:
|
||||
index = self.devices.index(settings.video['device'])
|
||||
self.input.setCurrentIndex(index)
|
||||
except:
|
||||
print('Video devices error!')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle(QtWidgets.QApplication.translate("videoSettingsForm", "Video settings"))
|
||||
|
|
Loading…
Reference in a new issue