Removed the extra title bar when return from fullscreen
This commit is contained in:
parent
7bd164b17e
commit
de6c0fd575
|
@ -6,6 +6,7 @@ local LogView = require "core.logview"
|
||||||
|
|
||||||
|
|
||||||
local fullscreen = false
|
local fullscreen = false
|
||||||
|
local restore_title_view = false
|
||||||
|
|
||||||
local function suggest_directory(text)
|
local function suggest_directory(text)
|
||||||
text = common.home_expand(text)
|
text = common.home_expand(text)
|
||||||
|
@ -27,9 +28,12 @@ command.add(nil, {
|
||||||
|
|
||||||
["core:toggle-fullscreen"] = function()
|
["core:toggle-fullscreen"] = function()
|
||||||
fullscreen = not fullscreen
|
fullscreen = not fullscreen
|
||||||
|
if fullscreen then
|
||||||
|
restore_title_view = core.title_view.visible
|
||||||
|
end
|
||||||
system.set_window_mode(fullscreen and "fullscreen" or "normal")
|
system.set_window_mode(fullscreen and "fullscreen" or "normal")
|
||||||
core.show_title_bar(not fullscreen)
|
core.show_title_bar(not fullscreen and restore_title_view)
|
||||||
core.title_view:configure_hit_test(not fullscreen)
|
core.title_view:configure_hit_test(not fullscreen and restore_title_view)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["core:reload-module"] = function()
|
["core:reload-module"] = function()
|
||||||
|
|
Loading…
Reference in New Issue