From 31455aa1650ece77101ac3a56d88e25bbeac6a87 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 14 Jul 2016 00:15:50 +0800 Subject: [PATCH] fix listbox horiz scroll issue(#145) --- source/gui/widgets/listbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 5295a1e7..abb84b68 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -2330,7 +2330,7 @@ namespace nana //H scroll enabled //If range_adjusted is true, it indicates no horzontal scroll bar is enabled. - bool enable_horz = (range_adjusted && (columns_pixels + 4 > sz.width)); // 4px = left and right borders(2px) + left and right gaps(2px) + bool enable_horz = ((!range_adjusted) && (columns_pixels + 4 > sz.width)); // 4px = left and right borders(2px) + left and right gaps(2px) unsigned head_scroll = 2 + header_visible_px() + (enable_horz ? scroll.scale : 0); // 2px left and right gaps(2px) unsigned lister_s = sz.height > head_scroll ? sz.height - head_scroll : 0;