Added functions for calculating scaled sizes
This commit is contained in:
+12
-1
@@ -88,6 +88,7 @@ class Config:
|
||||
self.guiLang = "en" # Hardcoded for now
|
||||
self.guiFont = ""
|
||||
self.guiFontSize = 11
|
||||
self.guiScale = 1.0
|
||||
|
||||
## Sizes
|
||||
self.winGeometry = [1100, 650]
|
||||
@@ -197,7 +198,17 @@ class Config:
|
||||
return
|
||||
|
||||
##
|
||||
# Actions
|
||||
# Methods
|
||||
##
|
||||
|
||||
def pxInt(self, theSize):
|
||||
return int(self.guiScale*theSize)
|
||||
|
||||
def pxFloat(self, theSize):
|
||||
return self.guiScale*theSize
|
||||
|
||||
##
|
||||
# Config Actions
|
||||
##
|
||||
|
||||
def initConfig(self, confPath=None, dataPath=None):
|
||||
|
||||
@@ -148,6 +148,8 @@ class GuiTheme:
|
||||
logger.verbose("GUI Font Pixel Size: %d" % self.fontPixelSize)
|
||||
logger.verbose("GUI Base Icon Size: %d" % self.baseIconSize)
|
||||
logger.verbose("GUI Text Icon Size: %d" % self.textIconSize)
|
||||
logger.verbose("Text 'N' Height: %d" % self.textNHeight)
|
||||
logger.verbose("Text 'N' Width: %d" % self.textNWidth)
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user