improve size and positioning of Tabbable's after being torn off, hidden, reshown, etc
This commit is contained in:
@@ -87,6 +87,7 @@ class LIBGTKMM2EXT_API WindowProxy : public PBD::StatefulDestructible, public vi
|
||||
|
||||
void save_pos_and_size ();
|
||||
void set_pos_and_size ();
|
||||
void set_pos ();
|
||||
|
||||
virtual bool delete_event_handler (GdkEventAny *ev);
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ void
|
||||
Tabbable::make_visible ()
|
||||
{
|
||||
if (_window && (current_toplevel() == _window)) {
|
||||
set_pos ();
|
||||
_window->present ();
|
||||
} else {
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ WindowProxy::set_pos_and_size ()
|
||||
}
|
||||
|
||||
if (_width != -1 && _height != -1) {
|
||||
_window->set_default_size (_width, _height);
|
||||
_window->resize (_width, _height);
|
||||
}
|
||||
|
||||
if (_x_off != -1 && _y_off != -1) {
|
||||
@@ -341,3 +341,19 @@ WindowProxy::set_pos_and_size ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WindowProxy::set_pos ()
|
||||
{
|
||||
if (!_window) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_width != -1 || _height != -1 || _x_off != -1 || _y_off != -1) {
|
||||
/* cancel any mouse-based positioning */
|
||||
_window->set_position (Gtk::WIN_POS_NONE);
|
||||
}
|
||||
|
||||
if (_x_off != -1 && _y_off != -1) {
|
||||
_window->move (_x_off, _y_off);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user