Some styles recompute the size based on the contents given in the QStyleOptionButton,
Some styles need to be given the icon in their content size. And this was not done properly
Set QStyle::State_Active conditional to whether the window is active,
which maps to Qt's active window concept and winit's has-focus (until we
render popups differently).
It was impossible to see which tab was the current tab.
Ensure that we set State_Active, like we do for the other styled controls.
Later, the active state should be tied to whether the window is "active" or not.
The metrics properties and the implementation of layout_info needs to
strictly reading cross-axis properties to avoid circular dependencies.
This patch applies a INT_MAX / 2 on the cross-axis to QStyle when
querying. Mostly the styles appear to just add/subtract margins, so this
value should not produce overflows while still providing an
approximation of "infinite" :)
Fixes#412