Make the about dialogs more similar.
authorRoy Marples <roy@marples.name>
Wed, 19 Nov 2014 22:17:01 +0000 (22:17 +0000)
committerRoy Marples <roy@marples.name>
Wed, 19 Nov 2014 22:17:01 +0000 (22:17 +0000)
src/dhcpcd-gtk/menu.c
src/dhcpcd-qt/dhcpcd-about.cpp

index 33c6114200f35da87697cfe550148821cce586fb..e68842181ca8cf828d560c4168633b6f6da30555 100644 (file)
@@ -28,7 +28,6 @@
 #include "dhcpcd-gtk.h"
 
 static const char *copyright = "Copyright (c) 2009-2014 Roy Marples";
 #include "dhcpcd-gtk.h"
 
 static const char *copyright = "Copyright (c) 2009-2014 Roy Marples";
-static const char *authors[] = { "Roy Marples <roy@marples.name>", NULL };
 
 static GtkStatusIcon *sicon;
 static GtkWidget *menu;
 
 static GtkStatusIcon *sicon;
 static GtkWidget *menu;
@@ -83,7 +82,6 @@ on_about(_unused GtkMenuItem *item)
                gtk_about_dialog_set_website_label(about, "dhcpcd Website");
                gtk_about_dialog_set_website(about,
                    "http://roy.marples.name/projects/dhcpcd");
                gtk_about_dialog_set_website_label(about, "dhcpcd Website");
                gtk_about_dialog_set_website(about,
                    "http://roy.marples.name/projects/dhcpcd");
-               gtk_about_dialog_set_authors(about, authors);
                gtk_about_dialog_set_logo_icon_name(about,
                    "network-transmit-receive");
                gtk_about_dialog_set_comments(about,
                gtk_about_dialog_set_logo_icon_name(about,
                    "network-transmit-receive");
                gtk_about_dialog_set_comments(about,
index cc12e8990bab5c12483461bbd724bf80c3dff001..d900102e931445a8e96c11b2a894029153bd916a 100644 (file)
  */
 
 #include <QDialog>
  */
 
 #include <QDialog>
+#include <QHBoxLayout>
 #include <QIcon>
 #include <QLabel>
 #include <QPixmap>
 #include <QPushButton>
 #include <QIcon>
 #include <QLabel>
 #include <QPixmap>
 #include <QPushButton>
+#include <QSpacerItem>
 #include <QVBoxLayout>
 
 #include "config.h"
 #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");
        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);
        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);
 
        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"));
        closeButton->setIcon(QIcon::fromTheme("window-close"));
-       layout->addWidget(closeButton);
+       hbox->addWidget(closeButton);
        connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
 }
 
        connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
 }