[bugfix] Main Page: Message Box Ratio. store the data in float and fix the bug that was set bit off message box's height.
This commit is contained in:
@@ -399,7 +399,7 @@ class Config:
|
||||
|
||||
@MESSAGE_BOX_RATIO.setter
|
||||
def MESSAGE_BOX_RATIO(self, value):
|
||||
if isinstance(value, int) and self.MESSAGE_BOX_RATIO_RANGE[0] <= value <= self.MESSAGE_BOX_RATIO_RANGE[1]:
|
||||
if isinstance(value, float):
|
||||
self._MESSAGE_BOX_RATIO = value
|
||||
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ class Controller:
|
||||
|
||||
@staticmethod
|
||||
def setMessageBoxRatio(data, *args, **kwargs) -> dict:
|
||||
config.MESSAGE_BOX_RATIO = int(data)
|
||||
config.MESSAGE_BOX_RATIO = float(data)
|
||||
return {"status":200, "result":config.MESSAGE_BOX_RATIO}
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user