Much simplier implementation of: "Show Toolbar" act immediately, i.e., even when already maximized, changing this toggle changes whenever toolbar is shown or not.

git-svn-id: svn://localhost/ardour2/branches/3.0@12695 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Rodrigo Severo 2012-06-13 04:21:46 +00:00
parent 1bd34a34f7
commit f9ed2ced4a
6 changed files with 39 additions and 34 deletions

View file

@ -3929,36 +3929,35 @@ Editor::session_state_saved (string)
}
void
Editor::maximise_editing_space (bool force)
Editor::update_tearoff_visibility()
{
if (_maximised && !force) {
bool visible = Config->get_keep_tearoffs();
_mouse_mode_tearoff->set_visible (visible);
_tools_tearoff->set_visible (visible);
_zoom_tearoff->set_visible (visible);
}
void
Editor::maximise_editing_space ()
{
if (_maximised) {
return;
}
fullscreen ();
bool visible = Config->get_keep_tearoffs();
_mouse_mode_tearoff->set_visible (visible);
_tools_tearoff->set_visible (visible);
_zoom_tearoff->set_visible (visible);
_maximised = true;
}
void
Editor::restore_editing_space (bool force)
Editor::restore_editing_space ()
{
if (!_maximised && !force) {
if (!_maximised) {
return;
}
unfullscreen();
bool visible = Config->get_keep_tearoffs();
_mouse_mode_tearoff->set_visible (visible);
_tools_tearoff->set_visible (visible);
_zoom_tearoff->set_visible (visible);
_maximised = false;
}