Fix #22766: Corrected off-by one error causing inconsistent row spacing. (rebased...
authorDan Mašek <dan.masek@gmail.com>
Tue, 15 Nov 2022 00:04:03 +0000 (01:04 +0100)
committerDan Mašek <dan.masek@gmail.com>
Sun, 20 Nov 2022 20:48:23 +0000 (21:48 +0100)
modules/highgui/src/window_w32.cpp

index 13ad679..8dbff98 100644 (file)
@@ -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 */