about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-30 22:04:27 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-30 22:04:27 -0700
commit2025172e525ab8e40433989cee6833550937b3c7 (patch)
treeed1ea295d49df334624d9bc8bc0eb79cd9310a03
parent0cd678581bccce17462710d553fa75a26c020751 (diff)
downloadview.love-2025172e525ab8e40433989cee6833550937b3c7.tar.gz
initialize screen width to something reasonable
-rw-r--r--main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.lua b/main.lua
index 039588c..9e0f886 100644
--- a/main.lua
+++ b/main.lua
@@ -102,10 +102,10 @@ function App.initialize(arg)
   love.keyboard.setTextInput(true)  -- bring up keyboard on touch screen
   love.keyboard.setKeyRepeat(true)
 
-  initialize_window_geometry()
-
   initialize_font_settings(20)
 
+  initialize_window_geometry()
+
   love.graphics.setBackgroundColor(1,1,1)
 
   if #arg > 0 then
@@ -135,7 +135,7 @@ function initialize_window_geometry()
   love.window.setMode(0, 0)  -- maximize
   App.screen.width, App.screen.height, App.screen.flags = love.window.getMode()
   -- shrink slightly to account for window decoration
-  App.screen.width = App.screen.width-100
+  App.screen.width = 40*App.width(Em)
   App.screen.height = App.screen.height-100
   App.screen.flags.resizable = true
   App.screen.flags.minwidth = math.min(App.screen.width, 200)