The get_width() method doesn't return the actual width of an widget.
Scenario: I was writing a code to detect if the mouse enters a certain widget (among widgets arranged in a row) from it's parent widget. For that I am subtracting the width of the previous widgets from x, but the value of get_width()
is coming of incorrect. I get the correct value only when using get_allocated_width()
, but it is deprecated.
The bug: The functions get_width()
and get_allocated_width()
are returning different values.