Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK] Setting TableLayout.Size on resize has no immediate effect #1752

Closed
benohub opened this issue Jul 22, 2020 · 3 comments · Fixed by #2196
Closed

[GTK] Setting TableLayout.Size on resize has no immediate effect #1752

benohub opened this issue Jul 22, 2020 · 3 comments · Fixed by #2196
Labels
Milestone

Comments

@benohub
Copy link

benohub commented Jul 22, 2020

var application = new Application(Eto.Platform.Detect); // Gtk

Label label = new Label { BackgroundColor = Colors.LightBlue };

var table = new TableLayout(1,1);
table.Add(label, 0, 0, true, true);
table.Size = new Size(150, 150);

var pixelLayout = new PixelLayout();
pixelLayout.Add(table, 0, 0);

pixelLayout.SizeChanged += (s,e) =>
{
	var size = pixelLayout.Size;
	table.Size = size; // Doesn't work
	table.Update(); // Doesn't change anything
	label.Text =
		"Expected: " + size +
		"\r\nBut is: " + table.Size;
};

application.Run(new Form { ClientSize = new Size(200, 200), Content = pixelLayout });

Actual Behavior

Using GtkSharp, TableLayout is not resized to 200x200 and stays at 150x150. When the form is resized manually, the size is updated but always one step too late of the actual size. See screenshot:
Gtk

Expected Behavior

As in WPF/Mac, see screenshot:
WpfMacOk

@benohub
Copy link
Author

benohub commented Jul 22, 2020

Additionally, in GTK, the form's height cannot be resized to be smaller, only bigger and ever growing. (Works fine in other platforms).

@cwensley
Copy link
Member

cwensley commented Nov 4, 2020

Thanks for reporting the issue.

@benohub
Copy link
Author

benohub commented Jul 5, 2022

Awesome, thank you for fixing it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants