From e5bea2bde4b8485a9051fb68aedaf08d9f7cf569 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Dan=20Ma=C5=A1ek?= Date: Tue, 15 Nov 2022 01:04:03 +0100 Subject: [PATCH] Fix #22766: Corrected off-by one error causing inconsistent row spacing. (rebased to 3.4) --- modules/highgui/src/window_w32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 13ad679..8dbff98 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -2212,7 +2212,7 @@ icvCreateTrackbar( const char* trackbar_name, const char* window_name, /* Retrieve current buttons count */ bcount = (int)SendMessage(window->toolbar.toolbar, TB_BUTTONCOUNT, 0, 0); - if(bcount > 1) + if (bcount > 0) { /* If this is not the first button then we need to separate it from the previous one */ -- 2.7.4