Getting width/height elements
myryk31415 opened this issue · comments
myryk31415 commented
I wanna use the width of the elements to hide them if the screen is not wide enough to show them all.
Is there any way to get the width/height of elements?
I could get the min-width from the css manually but that seems a bit tedious and also doesn't reflect the actual width accuratly.
kotontrion commented
const allocation = widget.get_allocation();
const width = allocation.width;
const height = allocation.height;
const x = allocation.x;
const y = allocation.y;
const width = widget.get_allocated_width()
const height = widget.get_allocated_height()
might be useful as well:
a widget will emit a size-allocate
signal when its size changed.
myryk31415 commented
Thanks a lot :)
Where do I find documentation of stuff like that? Not the ags-wiki right? GTK docs?
myryk31415 commented