Message info
 
To:kde-commits@kde.org From:Daniele E. Domenichelli Subject:[ktp-accounts-kcm] src: Make dialog look a little bit better Date:Fri, 30 Mar 2012 17:58:08 +0200 (CEST)
 

Git commit 092693bd33d7e24cd92f336374cacda66d667560 by Daniele E. Domenichelli.
Committed on 28/02/2012 at 01:18.
Pushed by ddomenichelli into branch 'master'.

Make dialog look a little bit better

M +18 -12 src/edit-display-name-button.cpp

http://commits.kde.org/telepathy-accounts-kcm/092693bd33d7e24cd92f336374cacda66d667560

diff --git a/src/edit-display-name-button.cpp b/src/edit-display-name-button.cpp
index 84ff86d..ac516d3 100644
--- a/src/edit-display-name-button.cpp
+++ b/src/edit-display-name-button.cpp
@@ -20,6 +20,7 @@

#include "edit-display-name-button.h"

+#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
#include <QtGui/QLabel>

@@ -60,37 +61,42 @@ EditDisplayNameDialog::EditDisplayNameDialog(Tp::AccountPtr account,
setCaption(i18n("Edit Display Name"));
setButtons( KDialog::Ok | KDialog::Cancel );
setWindowIcon(KIcon(QLatin1String("telepathy-kde")));
- setFixedSize(250, 150);
+ setFixedSize(400, 150);

- QVBoxLayout *mainLayout = new QVBoxLayout(this);
-
- QHBoxLayout *topLayout = new QHBoxLayout(this);
+ QWidget * mainWidget = new QWidget(this);
+ QVBoxLayout *mainLayout = new QVBoxLayout();
+ QHBoxLayout *topLayout = new QHBoxLayout();

QLabel *topLabel = new QLabel(i18n("Choose a new display name for your account"), this);
+ topLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
topLabel->setWordWrap(true);
QFont font = topLabel->font();
font.setBold(true);
topLabel->setFont(font);
- topLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+ QLabel *bottomLabel = new QLabel(i18n("A display name is your local alias for the account, only you will see it."), this);
+ bottomLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
+ bottomLabel->setWordWrap(true);

QLabel *icon = new QLabel;
- icon->setPixmap(KIcon(account->iconName()).pixmap(KIconLoader::SizeMedium));
icon->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ icon->setPixmap(KIcon(account->iconName()).pixmap(KIconLoader::SizeMedium));
+
+ m_displayNameLineEdit = new KLineEdit(account->displayName(), this);
+ m_displayNameLineEdit->setToolTip(i18n("New display name"));
+ m_displayNameLineEdit->setWhatsThis(i18n("A display name is your local alias for the account, only you will see it."));
+

topLayout->addWidget(topLabel);
- topLayout->addStretch();
topLayout->addWidget(icon);

mainLayout->addLayout(topLayout);
+ mainLayout->addStretch();

- m_displayNameLineEdit = new KLineEdit(account->displayName(), this);
mainLayout->addWidget(m_displayNameLineEdit);
-
- QLabel *bottomLabel = new QLabel(i18n("A display name is your local alias for the account, only you will see it."), this);
- bottomLabel->setWordWrap(true);
mainLayout->addWidget(bottomLabel);
+ mainLayout->addStretch();

- QWidget * mainWidget = new QWidget(this);
mainWidget->setLayout(mainLayout);
setMainWidget(mainWidget);
}