Bug 1696988 - Add backgrounds for non-native tooltips on Linux and OSX. r=ntim

The Linux styles match Adwaita trunk[1], so it's a bit smaller than the
native ones but I think that's fine (it matches other themes more
closely, like Arc).

On OSX the system color needs to be tweaked (will do in a follow-up)
since it is windows-style yellow right now, which is rather ugly. But
this is a progression regardless.

[1]: https://gitlab.gnome.org/GNOME/gtk/-/issues/3352

Differential Revision: https://phabricator.services.mozilla.com/D107548
This commit is contained in:
Emilio Cobos Álvarez 2021-03-09 00:33:06 +00:00
Родитель cf3391de9a
Коммит 30cf04d26c
3 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -13,7 +13,11 @@ tooltip {
appearance: auto;
-moz-default-appearance: tooltip;
max-width: 40em;
padding: 6px 10px; /* Matches Adwaita. */
color: InfoText;
background-color: InfoBackground;
font: message-box;
}

Просмотреть файл

@ -16,6 +16,7 @@ tooltip {
padding: 2px 3px;
max-width: 40em;
color: InfoText;
background-color: InfoBackground;
font: message-box;
cursor: default;
}

Просмотреть файл

@ -1377,6 +1377,7 @@ bool nsNativeThemeGTK::GetWidgetPadding(nsDeviceContext* aContext,
switch (aAppearance) {
case StyleAppearance::ButtonFocus:
case StyleAppearance::Toolbarbutton:
case StyleAppearance::Tooltip:
case StyleAppearance::MozWindowButtonBox:
case StyleAppearance::MozWindowButtonClose:
case StyleAppearance::MozWindowButtonMinimize: