Widget.SizeRequest() was made obsolete in Gtk 3.0
Jordi Mas
6 years ago
646 | 646 | void OnActivateToolbar (object sender, System.EventArgs args) |
647 | 647 | { |
648 | 648 | int width, height; |
649 | Requisition requisition; | |
650 | ||
651 | requisition = toolbar.SizeRequest (); | |
649 | Requisition minimum_size, natural_size; | |
650 | ||
651 | toolbar.GetPreferredSize(out minimum_size, out natural_size); | |
652 | 652 | app_window.GetSize (out width, out height); |
653 | 653 | toolbar.Visible = !toolbar.Visible; |
654 | 654 | |
662 | 662 | Preferences.Set <bool> (Preferences.ToolbarShowKey, toolbar.Visible); |
663 | 663 | Preferences.Save (); |
664 | 664 | } |
665 | app_window.Resize (width, height - requisition.Height); | |
665 | app_window.Resize (width, height - natural_size.Height); | |
666 | 666 | } |
667 | 667 | |
668 | 668 | void OnVerticalToolbar (object sender, System.EventArgs args) |