[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/dialogs
From: Christoph Feck <christoph () maxiom ! de>
Date: 2010-06-15 23:08:57
Message-ID: 20100615230857.D5D36AC8D4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1138399 by cfeck:
Fix size limits when word wrapped comment lines are added
BUG: 231241
M +8 -3 kpassworddialog.cpp
--- trunk/KDE/kdelibs/kdeui/dialogs/kpassworddialog.cpp #1138398:1138399
@@ -138,7 +138,7 @@
updateFields();
QRect desktop = KGlobalSettings::desktopGeometry(q->topLevelWidget());
- q->setMinimumWidth(qMin(1000, qMax(400, desktop.width() / 4)));
+ q->setMinimumWidth(qMin(1000, qMax(q->sizeHint().width(), desktop.width() / \
4))); q->setPixmap(KIcon("dialog-password").pixmap(KIconLoader::SizeHuge));
}
@@ -244,17 +244,22 @@
QLayoutItem *li = d->ui.formLayout->itemAt(i, QFormLayout::LabelRole);
if (li) {
QWidget *w = li->widget();
- if (w) firstColumnWidth = qMax(firstColumnWidth, w->sizeHint().width());
+ if (w && !w->isHidden()) {
+ firstColumnWidth = qMax(firstColumnWidth, w->sizeHint().width());
}
}
+ }
for (int i = 0; i < d->ui.formLayout->rowCount(); ++i) {
QLayoutItem *li = d->ui.formLayout->itemAt(i, QFormLayout::FieldRole);
if (li) {
QLabel *l = qobject_cast<QLabel*>(li->widget());
- if (l && l->wordWrap()) l->setMinimumHeight( l->heightForWidth( width() \
- firstColumnWidth - ( 2 * marginHint() ) - gridMarginLeft - gridMarginRight - \
spacing ) ); + if (l && l->wordWrap()) {
+ int w = sizeHint().width() - firstColumnWidth - ( 2 * marginHint() ) \
- gridMarginLeft - gridMarginRight - spacing; + l->setMinimumSize( w, \
l->heightForWidth(w) ); }
}
}
+}
void KPasswordDialog::showErrorMessage( const QString& message, const ErrorType type \
) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic