From 918bbba8c0645ed94a5355faa69f6da6593bf392 Mon Sep 17 00:00:00 2001 From: Ingmar Lehmann Date: Thu, 30 Mar 2017 21:12:14 +0200 Subject: [PATCH] Implemented full screen feature --- src/files.h | 3 ++- src/menu.cc | 6 ++++++ src/window.cc | 9 +++++++++ src/window.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/files.h b/src/files.h index bb34238..d3149f5 100644 --- a/src/files.h +++ b/src/files.h @@ -156,7 +156,8 @@ R"RAW( "close_tab": "w", "window_toggle_split": "", "window_toggle_tabs": "", - "window_clear_terminal": "" + "window_clear_terminal": "", + "full_screen": "F11" }, "project": { "default_build_path_comment": "Use to insert the project top level directory name", diff --git a/src/menu.cc b/src/menu.cc index 7c7147a..caab90f 100644 --- a/src/menu.cc +++ b/src/menu.cc @@ -454,6 +454,12 @@ const Glib::ustring menu_xml= R"RAW( app.window_clear_terminal +
+ + _Full _Screen + app.full_screen + +
diff --git a/src/window.cc b/src/window.cc index 8644d4e..03defea 100644 --- a/src/window.cc +++ b/src/window.cc @@ -1184,6 +1184,15 @@ void Window::set_menu_actions() { menu.add_action("window_clear_terminal", [this] { Terminal::get().clear(); }); + menu.add_action("full_screen", [this] { + if(!is_full_screen){ + Window::get().fullscreen(); + is_full_screen = true; + } else { + Window::get().unfullscreen(); + is_full_screen = false; + } + }); menu.add_action("window_toggle_tabs", [this] { Notebook::get().toggle_tabs(); }); diff --git a/src/window.h b/src/window.h index 1ec5d33..3259e0f 100644 --- a/src/window.h +++ b/src/window.h @@ -35,6 +35,7 @@ private: bool case_sensitive_search=true; bool regex_search=false; bool search_entry_shown=false; + bool is_full_screen=false; }; #endif // JUCI_WINDOW_H