TIYA6WCMQVCHD3OZQOAKFJSHB5MXEH6XM3DMTNWLVY5YRFRTJMAQC
MMKT36HLLK4XLKNNQRWDZTLYJ32LDI3KA7UGEOKJ5M5ZWIJFQXBAC
F4CDO43TDONECYDBP75EMW7FYQDG5WAPTUXX7BVABKP2HVFU6FVAC
YNJKEEUVDFDKMBSMFRZNACVUOATOL4AES6AIM4BL6AB64JZJGZKQC
IQGT6QGJASZ33RZLMCJRTN2W7SIZFN3YKNJ4RKRF3IEURFMLBOSAC
NFFIIQTC2B3E5Q4EJUTLZTPUUMU2S5LM7T2H2P2ENDS7H6XZNYRQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
76XOJEND6OWBWA7V6YXTQV2NP5SVVMLVZCCINBWKOBJARSUWNJJQC
ENENSZLKCCS7XILJUHIJUQPBOI6VK74YPHBFWPBXAHHHTHT2D3UQC
TJPL6S3YDULVVDS5AWVPQ6QJ3B4YFTNFIZTS3SOHNTMFIOMYVFTQC
XDGIFVAV2OA2LBW7P36YQXSQ7DI3RGPZA6K4CA6ILEFZ5I6VOV3AC
L2FWWEQLZPZLGTI34PWW2V6BU5PRDHFTZPTJJQYGG4R6WOFJ273QC
L5XCYDKRZJ4WXDEI6IL2RW63B3VRE6NPP5DW4HVU3CHCMCZEFLIAC
5RDWSYK2YESTIEDMGOD2T7E4KCOA6DOM35ECMZT2XZT57JSCRJEQC
function test_show_log_browser_side_splits_window_width()
-- initialize screen dimensions and indicate that it is maximized
App.screen.init{width=300, height=300}
-- set up desired window dimensions and make window resizable
_, _, App.screen.flags = App.screen.size()
App.screen.flags.resizable = true
App.screen.width, App.screen.height = settings.width, settings.height
App.screen.resize(App.screen.width, App.screen.height, App.screen.flags)
local os = love.system.getOS()
if os == 'Linux' then
-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.
App.screen.move(settings.x, settings.y-37, settings.displayindex)
else
App.screen.move(settings.x, settings.y, settings.displayindex)
end
-- Initialize window width/height and make window resizable.
--
-- I get tempted to have opinions about window dimensions here, but they're
-- non-portable:
-- - maximizing doesn't work on mobile and messes things up
-- - maximizing keeps the title bar on screen in Linux, but off screen on
-- Windows. And there's no way to get the height of the title bar.
-- It seems more robust to just follow LÖVE's default window size until
-- someone overrides it.
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
if Settings == nil then Settings = {} end
if Settings.source == nil then Settings.source = {} end
Settings.source.x, Settings.source.y, Settings.source.displayindex = App.screen.position()
Editor_state.width = Editor_state.right-Editor_state.left
Text.redraw_all(Editor_state)
Editor_state.right = App.screen.width - Margin_right
Editor_state.width = Editor_state.right-Editor_state.left
Text.redraw_all(Editor_state)
end
Log_browser_state.left = App.screen.width/2 + Margin_left
Log_browser_state.right = App.screen.width - Margin_right
File_navigation.cursors[Editor_state.filename] = {cursor1=Editor_state.cursor1, screen_top1=Editor_state.screen_top1}
App.screen.flags.resizable = true
end
function source.initialize_default_settings()
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
source.set_window_position_from_settings(settings)
Show_log_browser_side = settings.show_log_browser_side
local right = App.screen.width - Margin_right
if Show_log_browser_side then
right = App.screen.width/2 - Margin_right
end
Editor_state = edit.initialize_state(Margin_top, Margin_left, right, settings.font_height, math.floor(settings.font_height*1.3))
Editor_state.filename = settings.filename
-- set up desired window dimensions and make window resizable
_, _, App.screen.flags = App.screen.size()
run.set_window_position_from_settings(Settings)
end
function run.set_window_position_from_settings(settings)
local os = love.system.getOS()
if os == 'Linux' then
-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.
App.screen.move(settings.x, settings.y-37, settings.displayindex)
else
App.screen.move(settings.x, settings.y, settings.displayindex)
end
-- Initialize window width/height and make window resizable.
--
-- I get tempted to have opinions about window dimensions here, but they're
-- non-portable:
-- - maximizing doesn't work on mobile and messes things up
-- - maximizing keeps the title bar on screen in Linux, but off screen on
-- Windows. And there's no way to get the height of the title bar.
-- It seems more robust to just follow LÖVE's default window size until
-- someone overrides it.
if Settings == nil then Settings = {} end
Settings.x, Settings.y, Settings.displayindex = App.screen.position()
return {
App.screen.width, App.screen.height, App.screen.flags = App.screen.size()
end
function run.initialize_default_settings()
local font_height = 20
love.graphics.setFont(love.graphics.newFont(font_height))
Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right, Settings.font_height, math.floor(Settings.font_height*1.3))
Editor_state.filename = Settings.filename
Editor_state.screen_top1 = Settings.screen_top
Editor_state.cursor1 = Settings.cursor
App.screen.flags.resizable = true