Make the about dialogs more similar.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-about.cpp
index cc12e8990bab5c12483461bbd724bf80c3dff001..d900102e931445a8e96c11b2a894029153bd916a 100644 (file)
  */
 
 #include <QDialog>
+#include <QHBoxLayout>
 #include <QIcon>
 #include <QLabel>
 #include <QPixmap>
 #include <QPushButton>
+#include <QSpacerItem>
 #include <QVBoxLayout>
 
 #include "config.h"
@@ -49,7 +51,7 @@ DhcpcdAbout::DhcpcdAbout(DhcpcdQt *parent)
        layout = new QVBoxLayout(this);
 
        QIcon icon = DhcpcdQt::getIcon("status", "network-transmit-receive");
-       QPixmap picon = icon.pixmap(48, 48);
+       QPixmap picon = icon.pixmap(32, 32);
        iconLabel = new QLabel(this);
        iconLabel->setAlignment(Qt::AlignCenter);
        iconLabel->setPixmap(picon);
@@ -73,9 +75,12 @@ DhcpcdAbout::DhcpcdAbout(DhcpcdQt *parent)
        urlLabel->setOpenExternalLinks(true);
        layout->addWidget(urlLabel);
 
-       closeButton = new QPushButton(tr("Close"), this);
+       QHBoxLayout *hbox = new QHBoxLayout();
+       layout->addLayout(hbox);
+       hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding));
+       closeButton = new QPushButton(tr("Close"));
        closeButton->setIcon(QIcon::fromTheme("window-close"));
-       layout->addWidget(closeButton);
+       hbox->addWidget(closeButton);
        connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
 }