From affa6b8a3822e5924a1ad3fe498867cca6b8b253 Mon Sep 17 00:00:00 2001 From: mfranz Date: Fri, 21 Oct 2005 18:50:58 +0000 Subject: [PATCH] Fix alignment. Because our widget is an empty puObject's label, we need to compensate for the gap in-between: PUSTR_RGAP (pu.h). Without that, all text appears shifted right. --- src/GUI/layout.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GUI/layout.cxx b/src/GUI/layout.cxx index b887894cc..0f2b81059 100644 --- a/src/GUI/layout.cxx +++ b/src/GUI/layout.cxx @@ -153,7 +153,10 @@ void LayoutWidget::layout(int x, int y, int w, int h) // the x/y/w/h box we have calculated. if (isType("text")) { // puText labels are layed out to the right of the box, so - // zero the width. + // zero the width. Also subtract PUSTR_RGAP from the x + // coordinate to compensate for the added gap between the + // label and its empty puObject. + x -= 5; w = 0; } else if (isType("input") || isType("combo") || isType("select")) { // Fix the height to a constant -- 2.39.5