summaryrefslogtreecommitdiff
path: root/client/widgets/checkgroupbox.cc
diff options
context:
space:
mode:
authordeva <deva>2011-04-04 09:32:47 +0000
committerdeva <deva>2011-04-04 09:32:47 +0000
commitdeb8a5e8d56a8cd50a548632fe2e539a0c451bba (patch)
tree13f74fb37c301652d9cd35d33735d8e7e72c579e /client/widgets/checkgroupbox.cc
parent46683949163047405c55efc42fdd3c79e96cde0d (diff)
Make CheckGroupBox layout more compact.
Diffstat (limited to 'client/widgets/checkgroupbox.cc')
-rw-r--r--client/widgets/checkgroupbox.cc10
1 files changed, 7 insertions, 3 deletions
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");
}
//