From deb8a5e8d56a8cd50a548632fe2e539a0c451bba Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 4 Apr 2011 09:32:47 +0000 Subject: Make CheckGroupBox layout more compact. --- client/widgets/checkgroupbox.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client/widgets') diff --git a/client/widgets/checkgroupbox.cc b/client/widgets/checkgroupbox.cc index 07b7632..2298105 100644 --- a/client/widgets/checkgroupbox.cc +++ b/client/widgets/checkgroupbox.cc @@ -49,12 +49,12 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow) groupbox = new QGroupBox(); groupbox->setCheckable(true); connect(groupbox, SIGNAL(toggled(bool)), this, SLOT(state_change(bool))); - widget = groupbox; - if(elem.hasAttribute("caption")) { groupbox->setTitle(elem.attribute("caption")); } + widget = groupbox; + setCommonAttributes(widget, node); setCommonLayout(widget, node); @@ -62,7 +62,9 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow) } else if(type == "simple") { widget = new QWidget(); + widget->setContentsMargins(0,0,0,0); QHBoxLayout *l = new QHBoxLayout(); + l->setContentsMargins(0,0,0,0); widget->setLayout(l); checkbox = new QCheckBox(); connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(state_change(bool))); @@ -77,9 +79,11 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow) setCommonLayout(container, node); addChildren(node, container->layout()); + container->layout()->setContentsMargins(0,0,0,0); + } else { - ERROR(checkgroupbox, "Illigal value of attribute 'type'\n"); + ERROR(checkgroupbox, "Illegal value of attribute 'type'\n"); } // -- cgit v1.2.3