diff --git a/resources/empty_checkbox.png b/resources/empty_checkbox.png new file mode 100644 index 0000000..e8ad9d7 Binary files /dev/null and b/resources/empty_checkbox.png differ diff --git a/syncplay/constants.py b/syncplay/constants.py index 4a04326..1e6643f 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -120,8 +120,8 @@ STYLE_SUBCHECKBOX = "QCheckBox, QLabel {{ margin-left: 6px; padding-left: 21px; STYLE_SUBLABEL = "QCheckBox, QLabel {{ margin-left: 6px; padding-left: 16px; background:url('{}') left no-repeat }}" #Graphic path STYLE_ERRORLABEL = "QLabel { color : black; border-style: outset; border-width: 2px; border-radius: 7px; border-color: red; padding: 2px; background: #FFAAAA; }" STYLE_SUCCESSLABEL = "QLabel { color : black; border-style: outset; border-width: 2px; border-radius: 7px; border-color: green; padding: 2px; background: #AAFFAA; }" -STYLE_READY_PUSHBUTTON = "QPushButton { text-align: left; color : black; border-style: outset; border-width: 2px; border-radius: 7px; padding: 5px 3px 5px 3px; font-size: 11pt; font-weight: bold; } QPushButton::Checked {border-color: green; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #00CC00, stop: 1 #00FF00); } QPushButton::!Checked { border-color: maroon; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #FF0000, stop: 1 #BB0000); } QPushButton::hover:Checked {border-color: green; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #00FF00, stop: 1 #00DD00); } QPushButton::hover:!Checked { border-color: maroon; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BB0000, stop: 1 #FF0000); } QPushButton::pressed { border-style: inset; }" -STYLE_AUTO_PLAY_PUSHBUTTON = "QPushButton { text-align: left; color : black; border-style: outset; border-width: 2px; border-radius: 7px; padding: 2px; margin-left: 10px; } QPushButton::Checked {border-color: green; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #00CC00, stop: 1 #00FF00); } QPushButton::!Checked { border-color: maroon; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #FF0000, stop: 1 #BB0000); } QPushButton::hover:Checked {border-color: green; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #00FF00, stop: 1 #00DD00); } QPushButton::hover:!Checked { border-color: maroon; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BB0000, stop: 1 #FF0000); } QPushButton::pressed { border-style: inset; }" +STYLE_READY_PUSHBUTTON = "QPushButton { text-align: left; padding: 10px 5px 10px 5px;}" +STYLE_AUTO_PLAY_PUSHBUTTON = "QPushButton { text-align: left; padding: 5px 5px 5px 5px; }" STYLE_NOTIFICATIONBOX = "Username { color: #367AA9; font-weight:bold; }" STYLE_USERNAME = "color: #367AA9; font-weight:bold;" STYLE_ERRORNOTIFICATION = "color: red;" diff --git a/syncplay/messages.py b/syncplay/messages.py index 00cf861..1194dcb 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -211,10 +211,8 @@ en = { "togglepause-guibuttonlabel" : "Toggle pause", "play-guibuttonlabel" : "Play", "pause-guibuttonlabel" : "Pause", - "ready-guipushbuttonlabel" : u"I'm ready to watch! (Click to toggle)", - "notready-guipushbuttonlabel" : u"I'm not ready to watch! (Click to toggle)", + "ready-guipushbuttonlabel" : u"I'm ready to watch!", "autoplay-guipushbuttonlabel" : u"Auto-play when everyone is ready", - "noautoplay-guipushbuttonlabel" : u"Don't auto-play when everyone is ready", "roomuser-heading-label" : "Room / User", "size-heading-label" : "Size", @@ -550,10 +548,8 @@ ru = { "togglepause-guibuttonlabel" : u"Вкл./выкл. паузу", "play-guibuttonlabel" : u"Play", "pause-guibuttonlabel" : u"Пауза", - "ready-guipushbuttonlabel" : u"I'm ready to watch! (Click to toggle)", # TODO: Translate into Russian - "notready-guipushbuttonlabel" : u"I'm not ready to watch! (Click to toggle)", # TODO: Translate into Russian + "ready-guipushbuttonlabel" : u"I'm ready to watch!", # TODO: Translate into Russian "autoplay-guipushbuttonlabel" : u"Auto-play when everyone is ready", # TODO: Translate into Russian - "noautoplay-guipushbuttonlabel" : u"Don't auto-play when everyone is ready", # TODO: Translate into Russian "roomuser-heading-label" : u"Комната / Пользователь", "size-heading-label" : u"Size", # TODO: Translate into Russian @@ -887,10 +883,8 @@ de = { "togglepause-guibuttonlabel" : u"Pause umschalten", "play-guibuttonlabel" : u"Wiedergabe", "pause-guibuttonlabel" : u"Pause", - "ready-guipushbuttonlabel" : u"I'm ready to watch! (Click to toggle)", # TODO: Translate into German - "notready-guipushbuttonlabel" : u"I'm not ready to watch! (Click to toggle)", # TODO: Translate into German + "ready-guipushbuttonlabel" : u"I'm ready to watch!", # TODO: Translate into German "autoplay-guipushbuttonlabel" : u"Auto-play when everyone is ready", # TODO: Translate into German - "noautoplay-guipushbuttonlabel" : u"Don't auto-play when everyone is ready", # TODO: Translate into German "roomuser-heading-label" : u"Raum / Benutzer", "size-heading-label" : u"Größe", diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 9a95070..d42cc06 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -478,6 +478,7 @@ class MainWindow(QtGui.QMainWindow): window.readyPushButton = QtGui.QPushButton() readyFont = QtGui.QFont() readyFont.setWeight(QtGui.QFont.Bold) + window.readyPushButton.setText(getMessage("ready-guipushbuttonlabel")) window.readyPushButton.setCheckable(True) window.readyPushButton.setAutoExclusive(False) window.readyPushButton.toggled.connect(self.changeReadyState) @@ -488,6 +489,7 @@ class MainWindow(QtGui.QMainWindow): window.autoPlayPushButton = QtGui.QPushButton() autoPlayFont = QtGui.QFont() autoPlayFont.setWeight(QtGui.QFont.Bold) + window.autoPlayPushButton.setText(getMessage("autoplay-guipushbuttonlabel")) window.autoPlayPushButton.setCheckable(True) window.autoPlayPushButton.setAutoExclusive(False) window.autoPlayPushButton.toggled.connect(self.changeAutoPlayState) @@ -674,19 +676,15 @@ class MainWindow(QtGui.QMainWindow): ready = self.readyPushButton.isChecked() if ready: self.readyPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'tick_checkbox.png')) - self.readyPushButton.setText(getMessage("ready-guipushbuttonlabel")) else: - self.readyPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'cross_checkbox.png')) - self.readyPushButton.setText(getMessage("notready-guipushbuttonlabel")) + self.readyPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'empty_checkbox.png')) def updateAutoPlayIcon(self): ready = self.autoPlayPushButton.isChecked() if ready: self.autoPlayPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'tick_checkbox.png')) - self.autoPlayPushButton.setText(getMessage("autoplay-guipushbuttonlabel")) else: - self.autoPlayPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'cross_checkbox.png')) - self.autoPlayPushButton.setText(getMessage("noautoplay-guipushbuttonlabel")) + self.autoPlayPushButton.setIcon(QtGui.QIcon(self.resourcespath + 'empty_checkbox.png')) def automaticUpdateCheck(self): currentDateTime = datetime.utcnow()