From 1eba035f3617685952a0458f957101ea1dc9661e Mon Sep 17 00:00:00 2001 From: Yanru Mu Date: Mon, 28 Oct 2024 15:50:46 +0800 Subject: [PATCH] fix: set min-height qss for vertical handle(when to show thousands data, handle too small) --- dayu_widgets/static/main.qss | 1 + dayu_widgets/theme.py | 1 + 2 files changed, 2 insertions(+) diff --git a/dayu_widgets/static/main.qss b/dayu_widgets/static/main.qss index ced2e467..2c70dc13 100644 --- a/dayu_widgets/static/main.qss +++ b/dayu_widgets/static/main.qss @@ -1054,6 +1054,7 @@ QScrollBar:vertical { QScrollBar::handle:vertical { background-color: @background_selected_color; + min-height: @scroll_bar_min_length@unit; } QScrollBar::add-line:vertical { diff --git a/dayu_widgets/theme.py b/dayu_widgets/theme.py index f9011790..8b97bb30 100644 --- a/dayu_widgets/theme.py +++ b/dayu_widgets/theme.py @@ -95,6 +95,7 @@ def get_theme_size(): "indicator_padding": int(4 * scale_factor_x), "indicator_size": int(8 * scale_factor_x), "scroll_bar_size": int(12 * scale_factor_x), + "scroll_bar_min_length": int(20 * scale_factor_x), "scroll_bar_margin": int(12 * scale_factor_x * 2) + 1, "scroll_bar_radius": int(12 * scale_factor_x / 2.0), }