From 2354bc9f4d32fe9372f6412e5fe03c0d230a6483 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 15 Jul 2021 21:57:34 +0200 Subject: [PATCH] Increase scroll bars size for easier usage --- Source/Engine/UI/GUI/Panels/Panel.cs | 4 ++-- Source/Engine/UI/GUI/Panels/ScrollBar.cs | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/Engine/UI/GUI/Panels/Panel.cs b/Source/Engine/UI/GUI/Panels/Panel.cs index 8be61bbf6..b2a011040 100644 --- a/Source/Engine/UI/GUI/Panels/Panel.cs +++ b/Source/Engine/UI/GUI/Panels/Panel.cs @@ -401,7 +401,7 @@ namespace FlaxEngine.GUI if (VScrollBar != null) { float height = Height; - bool vScrollEnabled = (controlsBounds.Bottom > height + 0.01f || controlsBounds.Y < 0.0f) && height > ScrollBar.DefaultMinimumSize; + bool vScrollEnabled = (controlsBounds.Bottom > height + 0.01f || controlsBounds.Y < 0.0f) && height > ScrollBar.DefaultSize; if (VScrollBar.Enabled != vScrollEnabled) { @@ -428,7 +428,7 @@ namespace FlaxEngine.GUI if (HScrollBar != null) { float width = Width; - bool hScrollEnabled = (controlsBounds.Right > width + 0.01f || controlsBounds.X < 0.0f) && width > ScrollBar.DefaultMinimumSize; + bool hScrollEnabled = (controlsBounds.Right > width + 0.01f || controlsBounds.X < 0.0f) && width > ScrollBar.DefaultSize; if (HScrollBar.Enabled != hScrollEnabled) { diff --git a/Source/Engine/UI/GUI/Panels/ScrollBar.cs b/Source/Engine/UI/GUI/Panels/ScrollBar.cs index 37035105c..0175de5a5 100644 --- a/Source/Engine/UI/GUI/Panels/ScrollBar.cs +++ b/Source/Engine/UI/GUI/Panels/ScrollBar.cs @@ -14,18 +14,13 @@ namespace FlaxEngine.GUI /// /// The default size. /// - public const int DefaultSize = 12; + public const int DefaultSize = 14; /// /// The default minimum opacity. /// public const float DefaultMinimumOpacity = 0.7f; - /// - /// The default minimum size. - /// - public const int DefaultMinimumSize = 12; - // Scrolling private float _clickChange = 20, _scrollChange = 30;