Skip to content

Commit

Permalink
adjustments for Windows and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
schorschii committed Nov 10, 2021
1 parent b5741b8 commit fe833bf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions laps-gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def OnClickReject(self):
self.close()

class LapsMainWindow(QMainWindow):
PRODUCT_NAME = 'LAPS4LINUX'
PLATFORM = sys.platform.lower()

PRODUCT_NAME = 'LAPS4WINDOWS' if PLATFORM=='win32' else 'LAPS4MAC' if PLATFORM=='darwin' else 'LAPS4LINUX'
PRODUCT_VERSION = '1.5.0'
PRODUCT_WEBSITE = 'https://github.com/schorschii/laps4linux'
PROTOCOL_SCHEME = 'laps://'
Expand All @@ -143,7 +145,7 @@ class LapsMainWindow(QMainWindow):
cfgPresetDirWindows = path.dirname(sys.executable) if getattr(sys, 'frozen', False) else sys.path[0]
cfgPresetDirUnix = '/etc'
cfgPresetFile = 'laps-client.json'
cfgPresetPath = (cfgPresetDirWindows if sys.platform.lower()=='win32' else cfgPresetDirUnix)+'/'+cfgPresetFile
cfgPresetPath = (cfgPresetDirWindows if PLATFORM=='win32' else cfgPresetDirUnix)+'/'+cfgPresetFile

cfgPath = str(Path.home())+'/.laps-client.json'
cfgServer = []
Expand Down Expand Up @@ -216,8 +218,12 @@ def InitUI(self):
gridLine += 1
txtAdditionalAttribute = QLineEdit()
txtAdditionalAttribute.setReadOnly(True)
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
font.setPointSize(14)
if(self.PLATFORM=='win32'):
font = QFont('Consolas', 14)
font.setBold(True)
else:
font = QFontDatabase.systemFont(QFontDatabase.FixedFont)
font.setPointSize(18 if self.PLATFORM=='darwin' else 14)
txtAdditionalAttribute.setFont(font)
grid.addWidget(txtAdditionalAttribute, gridLine, 0)
gridLine += 1
Expand Down

0 comments on commit fe833bf

Please sign in to comment.