зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1670694 - Use larger minimum size for Gtk-like non-native theme scrollbar thumbs. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93281
This commit is contained in:
Родитель
90f11a9082
Коммит
67b7fe9431
|
@ -8,6 +8,7 @@
|
|||
using namespace mozilla;
|
||||
|
||||
static constexpr CSSIntCoord kMinimumScrollbarSize = 12;
|
||||
static constexpr CSSIntCoord kMinimumScrollbarThumbSize = 40;
|
||||
|
||||
already_AddRefed<nsITheme> do_GetBasicNativeThemeDoNotUseDirectly() {
|
||||
static mozilla::StaticRefPtr<nsITheme> gInstance;
|
||||
|
@ -46,6 +47,19 @@ nsNativeBasicThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
|||
auto size = static_cast<uint32_t>(kMinimumScrollbarSize) * dpiRatio;
|
||||
aResult->SizeTo(size, size);
|
||||
|
||||
switch (aAppearance) {
|
||||
case StyleAppearance::ScrollbarthumbHorizontal:
|
||||
aResult->width =
|
||||
static_cast<uint32_t>(kMinimumScrollbarThumbSize) * dpiRatio;
|
||||
break;
|
||||
case StyleAppearance::ScrollbarthumbVertical:
|
||||
aResult->height =
|
||||
static_cast<uint32_t>(kMinimumScrollbarThumbSize) * dpiRatio;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
*aIsOverridable = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче