Draw highlight outline, for if outline is empty (Qt.NoPen), highlight entire background.
TODO: Do we need full bg/fg/outline hover-highlighting support?
Previous square cap style caused it to be drawen slightly out of end
point, and that part sometimes appeared above port, sometimes not
(usually if you select one port, connection covers port on another
side).
First attempt to use HSV model - no need to dance with RGB equalizing.
Two utility functions are added to complement missing QColor functionality.
Strange border with audio jack ports in very begining seems to be accedental,
so trying to improve original color scheme. Background is light grey (some least
color contrast would be great, even with border). Unselected port text is colored.
Now it is also compact. Port groups (by type) now look monolithic (with saw-like internal side as feature).
Space between port groups reduced to 1 pixel, right enough to distinguish.
Reduced transparency for port text - font is too small for that (may be make slightly bigger font).
Group box may get non-integer coordinates if, e.g. moved with scaled viewport.
When it happens, previously sharp lines between to draw between pixels,
while previously blurred lines may reversly get a sharp look.
When in scaled state, graphics still may be badly-antialiased though.
Text in port is aligned by center.
In group it is centered in header rect.
When icon is supported, text is aligned vertically with it,
and centered between icon and right group edge.
Original look has all port colors close to dark style, and border color was not contrast, but rather intermediate.
Also use some alpha for text, for some color hinting.
Another trouble with this theme - jack port sel color is painted black, ignoring theme.
The drawRect() doesn't have variant, using qreal values, but it accepts QRectF. Even for integer coordinates it uses subpixel positioning, thus always placing them exactly between pixels.