From 75da0ef5cb9b9a1dc739f378e520c1563e47623b Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Mon, 30 Dec 2019 16:48:23 +0000 Subject: [PATCH] DemoRunner: Fixed a layout bug in the fonts demo --- examples/GUI/FontsDemo.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/GUI/FontsDemo.h b/examples/GUI/FontsDemo.h index baeb14d95b..035fd8c544 100644 --- a/examples/GUI/FontsDemo.h +++ b/examples/GUI/FontsDemo.h @@ -151,11 +151,13 @@ public: r.removeFromLeft (verticalDividerBar->getRight()); - styleBox.setBounds (r.removeFromBottom (26)); - r.removeFromBottom (8); - int labelWidth = 60; + auto styleArea = r.removeFromBottom (26); + styleArea.removeFromLeft (labelWidth); + styleBox.setBounds (styleArea); + r.removeFromBottom (8); + auto row = r.removeFromBottom (30); row.removeFromLeft (labelWidth); boldToggle.setBounds (row.removeFromLeft (row.getWidth() / 2)); @@ -215,8 +217,8 @@ private: Label heightLabel { {}, "Height:" }, kerningLabel { {}, "Kerning:" }, - scaleLabel { "Scale:" }, - styleLabel { "Style" }; + scaleLabel { {}, "Scale:" }, + styleLabel { {}, "Style:" }; ToggleButton boldToggle { "Bold" }, italicToggle { "Italic" };