macOS: Use light color for tooltip text in dark mode

Tool tip text is drawn by QLabel using ToolTipText
text role. Give it a system palette entry.

Change-Id: I2e1b4f0b130783efd8d03f53a42c3e64aec32425
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Morten Johan Sørvig 2018-09-07 11:58:28 +02:00
parent 02f7444c85
commit d0528d558e

View File

@ -225,6 +225,9 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
pal.setBrush(QPalette::Active, QPalette::Base, qt_mac_toQColor([NSColor textBackgroundColor]));
pal.setBrush(QPalette::Disabled, QPalette::Base,
pal.brush(QPalette::Active, QPalette::Base));
} else if (mac_widget_colors[i].paletteRole == QPlatformTheme::LabelPalette) {
qc = qt_mac_toQColor([NSColor labelColor]);
pal.setBrush(QPalette::Inactive, QPalette::ToolTipText, qc);
}
palettes.insert(mac_widget_colors[i].paletteRole, &pal);
}