summaryrefslogtreecommitdiff
path: root/client/widgets/button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/button.cc')
-rw-r--r--client/widgets/button.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/client/widgets/button.cc b/client/widgets/button.cc
index 0f9df2f..2eee811 100644
--- a/client/widgets/button.cc
+++ b/client/widgets/button.cc
@@ -27,24 +27,14 @@
#include "button.h"
#include <stdio.h>
+#include "common.h"
+
Button::Button(QDomNode &node, MacroWindow *macrowindow)
: QPushButton(), Widget(node, macrowindow)
{
- QDomElement elem = node.toElement();
-
- if(elem.hasAttribute("width")) {
- //resize(elem.attribute("width").toInt(), height());
- setMinimumWidth(elem.attribute("width").toInt());
- }
+ setCommonAttributes(this, node);
- if(elem.hasAttribute("height")) {
- //resize(width(), elem.attribute("height").toInt());
- setMinimumHeight(elem.attribute("height").toInt());
- }
-
- if(elem.hasAttribute("help")) {
- setToolTip(elem.attribute("help"));
- }
+ QDomElement elem = node.toElement();
if(elem.hasAttribute("field")) {
field = elem.attribute("field");