From 09c38ab3c497feee9ff446963297c881d241beb0 Mon Sep 17 00:00:00 2001
From: TheReign
Date: Wed, 23 Dec 2015 00:20:43 -0500
Subject: fix avatar choose dialog
---
src/modules/options/OptionsWidget_identity.cpp | 55 ++++++++++++++------------
1 file changed, 30 insertions(+), 25 deletions(-)
(limited to 'src/modules/options/OptionsWidget_identity.cpp')
diff --git a/src/modules/options/OptionsWidget_identity.cpp b/src/modules/options/OptionsWidget_identity.cpp
index d4f9893ad..4972c0c40 100644
--- a/src/modules/options/OptionsWidget_identity.cpp
+++ b/src/modules/options/OptionsWidget_identity.cpp
@@ -203,45 +203,50 @@ AvatarSelectionDialog::AvatarSelectionDialog(QWidget * par,const QString &szInit
{
setWindowTitle(__tr2qs_ctx("Choose Avatar - KVIrc","options"));
- QGridLayout * g = new QGridLayout(this);
+ QVBoxLayout * layout = new QVBoxLayout(this);
- QString msg = "";
- msg += __tr2qs_ctx("Please select an avatar image. " \
- "The full path to a local file or an image on the Web can be used.
" \
- "If you wish to use a local image file, click the \"Browse\"" \
- "button to browse local folders.
" \
- "The full URL for an image (including http://) can be entered manually.","options");
- msg += "
";
+ QString msg = __tr2qs_ctx("Please select an avatar image.\n\n" \
+ "The full path to a local file or an image on the Web can be used. " \
+ "If you wish to use a local image file, click the \"Browse\"" \
+ "button to browse local folders. " \
+ "The full URL for an image (including http:// or https://) can be entered manually.","options");
- QLabel * l = new QLabel(msg,this);
+ QLabel * l = new QLabel(msg);
l->setMinimumWidth(250);
+ l->setWordWrap(true);
- g->addWidget(l,0,0);
+ layout->addWidget(l);
- m_pLineEdit = new QLineEdit(this);
+ m_pLineEdit = new QLineEdit;
m_pLineEdit->setText(szInitialPath);
- m_pLineEdit->setMinimumWidth(100);
- g->addWidget(m_pLineEdit,1,0,1,2);
+ m_pLineEdit->setMinimumWidth(300);
+
+ QHBoxLayout * pLineEditLayout = new QHBoxLayout;
- QPushButton * b = new QPushButton(__tr2qs_ctx("&Browse...","options"),this);
+ pLineEditLayout->addWidget(m_pLineEdit,1);
+
+ QPushButton * b = new QPushButton(__tr2qs_ctx("&Browse...","options"));
+ b->setFixedWidth(80);
connect(b,SIGNAL(clicked()),this,SLOT(chooseFileClicked()));
- g->addWidget(b,1,2);
+ pLineEditLayout->addWidget(b,1);
- KviTalHBox * h = new KviTalHBox(this);
- h->setSpacing(8);
- g->addWidget(h,2,1,1,2);
- b = new QPushButton(__tr2qs_ctx("&OK","options"),h);
- b->setMinimumWidth(80);
+ layout->addLayout(pLineEditLayout);
+
+ QHBoxLayout * h = new QHBoxLayout;
+
+ h->setAlignment(Qt::AlignRight);
+ layout->addLayout(h);
+ b = new QPushButton(__tr2qs_ctx("&OK","options"));
+ b->setFixedWidth(80);
b->setDefault(true);
connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
+ h->addWidget(b);
- b = new QPushButton(__tr2qs_ctx("Cancel","options"),h);
- b->setMinimumWidth(80);
+ b = new QPushButton(__tr2qs_ctx("Cancel","options"));
+ b->setFixedWidth(80);
connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
-
- g->setRowStretch(0,1);
- g->setColumnStretch(0,1);
+ h->addWidget(b);
}
AvatarSelectionDialog::~AvatarSelectionDialog()
--
cgit v1.3.1-10-gc9f91