Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
[Gtk] Add OnSizeRequested callbacks to children. (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Therzok committed Nov 28, 2017
1 parent 63f1cf7 commit 341b9e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Xwt.Gtk/Xwt.GtkBackend/BoxBackendGtk2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Linq;

namespace Xwt.GtkBackend
{
Expand All @@ -34,6 +35,13 @@ public void QueueResizeIfRequired()
if (!IsReallocating)
QueueResize ();
}

protected override void OnSizeRequested (ref Gtk.Requisition requisition)
{
base.OnSizeRequested (ref requisition);
foreach (var c in children.Keys.ToArray ())
c.SizeRequest ();
}
}
}

0 comments on commit 341b9e7

Please sign in to comment.