wibox.widget.systray: Properly work when rotated (FS#1115)
commitf859131bf33139671d4381d6fe1183e2686e18a0
authorUli Schlachter <psychon@znc.in>
Sat, 16 Feb 2013 21:14:08 +0000 (16 22:14 +0100)
committerUli Schlachter <psychon@znc.in>
Sat, 16 Feb 2013 21:14:08 +0000 (16 22:14 +0100)
tree82357ce927f259aee00ee17dc04f692433e74213
parentf86a9c896cddc215704ddfe3779ad03545e71e72
wibox.widget.systray: Properly work when rotated (FS#1115)

The systray widget's fit() function worked in the (rotated) user coordinate
space while the draw() function used device coordinates (unrotated). This meant
that width and height were swapped up in the calculations and the systray ended
up being way too small.

Fix this by making the draw() function use user coordinates, too. This means
that it needs some new magic to detect a rotated coordinate space. This, in
turn, means that the systray is now automatically rotated when you put it into a
rotate layout.

This might cause some minor breakage because people no longer need to call
:set_horizontal() on the widgets.

Thanks a lot to Alexander Gehrke for his help!

Signed-off-by: Uli Schlachter <psychon@znc.in>
lib/wibox/widget/systray.lua.in