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

Fix SqueezerBin::size_allocate() in example #1760

Merged
merged 1 commit into from
Jun 2, 2024
Merged

Conversation

mtilda
Copy link
Contributor

@mtilda mtilda commented Jun 2, 2024

The example squeezer_bin is not working on my machine, as described in #1757.

While investigating that bug, I noticed a mistake in SqueezerBin::size_allocate(). I noticed the function child_size() is returning all zeros, because it is being passed the wrong argument. This PR fixes that mistake.

There is still a bug in the code that causes this example to panic. To avoid panic and to test this change, comment out these lines:

mode_switch
.bind_property("state", &squeezer, "keep-aspect-ratio")
.build();

cd into the directory examples and run cargo run --bin squeezer_bin.

After this change, the text "Hello World!" should be visible in the window.

@mtilda mtilda requested a review from bilelmoussaoui as a code owner June 2, 2024 04:28
@sdroege sdroege merged commit 1b8dc13 into gtk-rs:master Jun 2, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants