From e4be65a3485f63f1d6a4be4ba10dfc4f196c0a93 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Wed, 19 Jul 2023 01:01:16 +0200 Subject: [PATCH] Fix stupid comparison bug Previously, dim.width < dim.height would never return true, since it is already checked by dim.height >= dim.width. --- src/Widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widget.cpp b/src/Widget.cpp index dd18b32..4685971 100644 --- a/src/Widget.cpp +++ b/src/Widget.cpp @@ -304,7 +304,7 @@ Quad CairoArea::GetQuad() q.x = 0; q.y = ((double)dim.height - (double)dim.width) / 2; } - else if (dim.width < dim.height) + else if (dim.height < dim.width) { // Height greater than width; Fill in y and add margin at the sides q.size = dim.height;