Default to more sane window size

This commit is contained in:
Mark Qvist 2024-12-08 20:19:22 +01:00
parent 2cc4182376
commit f71a3934d7

View File

@ -24,6 +24,9 @@ import base64
import threading import threading
import RNS.vendor.umsgpack as msgpack import RNS.vendor.umsgpack as msgpack
WINDOW_DEFAULT_WIDTH = "480"
WINDOW_DEFAULT_HEIGHT = "750"
app_ui_scaling_path = None app_ui_scaling_path = None
def apply_ui_scale(): def apply_ui_scale():
global app_ui_scaling_path global app_ui_scaling_path
@ -171,6 +174,11 @@ if not args.daemon:
local = os.path.dirname(__file__) local = os.path.dirname(__file__)
sys.path.append(local) sys.path.append(local)
if not RNS.vendor.platformutils.is_android():
from kivy.config import Config
Config.set("graphics", "width", WINDOW_DEFAULT_WIDTH)
Config.set("graphics", "height", WINDOW_DEFAULT_HEIGHT)
if args.daemon: if args.daemon:
from .sideband.core import SidebandCore from .sideband.core import SidebandCore
class DaemonElement(): class DaemonElement():