Skip to content

Commit

Permalink
Prepare for version 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Nov 27, 2021
1 parent b922334 commit a2d3c2e
Show file tree
Hide file tree
Showing 16 changed files with 14,403 additions and 19 deletions.
1 change: 0 additions & 1 deletion elevenclock/elevenclock.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,6 @@ def mouseReleaseEvent(self, ev: QMouseEvent) -> None:

def eventFilter(self, watched: QObject, event: QEvent) -> bool:
if event.type() == event.Paint:
print(self.minimumSizeHint().width())
w = self.minimumSizeHint().width()
if w<self.window().getPx(self.window().preferedwidth) and not getSettings("ClockOnTheLeft"):
self.move(self.window().getPx(self.window().preferedwidth)-self.minimumSizeHint().width(), 0)
Expand Down
20 changes: 11 additions & 9 deletions elevenclock/lang/LOCALE_UPDATER.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@



OLDSTR = b"lang2_7 = {"

NEWSTR = b"""lang2_7_bis = {
"Use a custom font": "",
"Use a custom font size": "",
"Enable hide when multi-monitor fullscreen apps are running": "",
"<b>{0}</b> needs to be enabled to change this setting": "",
"<b>{0}</b> needs to be disabled to change this setting": "",
OLDSTR = b"lang2_7_bis = {"

NEWSTR = b"""lang_2_8 = {
"Force the clock to be at the top of the screen": "",
"Show the clock on the primary screen": "",
"Use a custom font color": "",
"Use a custom background color": "",
"Align the clock text to the center": "",
"Select custom color": "",
"Hide the clock when a program occupies all screens": "",
}
lang2_7 = lang2_7_bis | {"""
lang2_7_bis = lang_2_8 | {"""

input(f"Path is \"{os.getcwd()}\" Press [INTRO] to contniue")
print()
Expand Down
Binary file modified elevenclock/resources/icon.bmp
Binary file not shown.
Binary file modified elevenclock/resources/icon.ico
Binary file not shown.
Binary file added elevenclock/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions elevenclock/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def restartElevenClockByLangChange():
self.legacyHideOnFullScreen.setChecked(not getSettings("DisableHideOnFullScreen"))
self.legacyHideOnFullScreen.stateChanged.connect(lambda i: setSettings("DisableHideOnFullScreen", not bool(i)))
layout.addWidget(self.legacyHideOnFullScreen)
self.legacyRDPHide = QSettingsCheckBox(_("Hide the clock when RDP Client or Citrix Workspace are running").replace("RDP", "RDP, VMWare Horizon"))
self.newFullScreenHide = QSettingsCheckBox(_("Hide the clock when a program occupies all screens"))
self.newFullScreenHide.setChecked(getSettings("NewFullScreenMethod"))
self.newFullScreenHide.stateChanged.connect(lambda i: setSettings("NewFullScreenMethod", bool(i)))
layout.addWidget(self.newFullScreenHide)
self.legacyRDPHide = QSettingsCheckBox(_("Hide the clock when RDP Client or Citrix Workspace are running")+" (Old method)".replace("RDP", "RDP, VMWare Horizon"))
self.legacyRDPHide.setChecked(getSettings("EnableHideOnRDP"))
self.legacyRDPHide.stateChanged.connect(lambda i: setSettings("EnableHideOnRDP", bool(i)))
layout.addWidget(self.legacyRDPHide)
Expand All @@ -135,7 +139,7 @@ def restartElevenClockByLangChange():
self.clockAtLeft.setChecked(getSettings("ClockOnTheLeft"))
self.clockAtLeft.stateChanged.connect(lambda i: setSettings("ClockOnTheLeft", bool(i)))
layout.addWidget(self.clockAtLeft)
self.primaryScreen = QSettingsCheckBox(_("Show the clock on the primary screen (Useful if clock is set on the left)"))
self.primaryScreen = QSettingsCheckBox(_("Show the clock on the primary screen"))
self.primaryScreen.setStyleSheet(f"QWidget#stChkBg{{border-bottom-left-radius: {self.getPx(6)}px;border-bottom-right-radius: {self.getPx(6)}px;border-bottom: 1px;}}")
self.primaryScreen.setChecked(getSettings("ForceClockOnFirstMonitor"))
self.primaryScreen.stateChanged.connect(lambda i: setSettings("ForceClockOnFirstMonitor", bool(i)))
Expand Down Expand Up @@ -226,10 +230,6 @@ def restartElevenClockByLangChange():

self.experimentalTitle = QIconLabel(_("Fixes and other experimental features: (Use ONLY if something is not working)"), getPath(f"experiment_{self.iconMode}.png"))
layout.addWidget(self.experimentalTitle)
self.newFullScreenHide = QSettingsCheckBox(_("Enable hide when multi-monitor fullscreen apps are running"))
self.newFullScreenHide.setChecked(getSettings("NewFullScreenMethod"))
self.newFullScreenHide.stateChanged.connect(lambda i: setSettings("NewFullScreenMethod", bool(i)))
layout.addWidget(self.newFullScreenHide)
self.fixDash = QSettingsCheckBox(_("Fix the hyphen/dash showing over the month"))
self.fixDash.setChecked(getSettings("EnableHyphenFix"))
self.fixDash.stateChanged.connect(lambda i: setSettings("EnableHyphenFix", bool(i)))
Expand Down Expand Up @@ -1387,7 +1387,7 @@ def __init__(self, text: str, parent=None):
self.colorDialog.setOptions(QColorDialog.DontUseNativeDialog)
self.button = QPushButton(self)
self.button.setObjectName("stCmbbx")
self.button.setText("Select custom color")
self.button.setText(_("Select custom color"))
self.button.clicked.connect(self.colorDialog.show)
self.colorDialog.colorSelected.connect(self.valuechangedEvent)
self.checkbox.stateChanged.connect(self.stateChangedEvent)
Expand Down
4 changes: 2 additions & 2 deletions elevenclock/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import globals
from languages import *

version = 2.79
versionName = "2.8.0-beta"
version = 2.8
versionName = "2.8.0"

def _(s): #Translate function
global lang
Expand Down
Binary file added icon.bmp
Binary file not shown.
Binary file added icon.ico
Binary file not shown.
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a2d3c2e

Please sign in to comment.