author | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
commit | d6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (unidiff) | |
tree | 6f83c692713c41896a165e399f259a744f125e5c /pwmanager | |
parent | bb235c5a639b914574e1e247d2de6e479517585f (diff) | |
download | kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.zip kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.gz kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.bz2 |
small fixes
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp index 8b6dfbc..8404c3e 100644 --- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp | |||
@@ -29,57 +29,64 @@ $Id$ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | #include <qvariant.h> | 31 | #include <qvariant.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qlineedit.h> | 34 | #include <qlineedit.h> |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qtooltip.h> | 36 | #include <qtooltip.h> |
37 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <qwidget.h> | 40 | #include <qwidget.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qlineedit.h> | 43 | #include <qlineedit.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qapplication.h> | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Constructs a getMasterPwWnd as a child of 'parent', with the | 48 | * Constructs a getMasterPwWnd as a child of 'parent', with the |
48 | * name 'name' | 49 | * name 'name' |
49 | */ | 50 | */ |
50 | getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) | 51 | getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) |
51 | : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), | 52 | : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), |
52 | KDialogBase::Ok | KDialogBase::Cancel, | 53 | KDialogBase::Ok | KDialogBase::Cancel, |
53 | KDialogBase::Ok, parent, name, true ) | 54 | KDialogBase::Ok, parent, name, true ) |
54 | { | 55 | { |
55 | QWidget *page = plainPage(); | 56 | QWidget *page = plainPage(); |
56 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); | 57 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); |
57 | 58 | ||
58 | pwLineEdit = new QLineEdit( page, "pwLineEdit" ); | 59 | pwLineEdit = new QLineEdit( page, "pwLineEdit" ); |
59 | pwLineEdit->setEchoMode( QLineEdit::Password ); | 60 | pwLineEdit->setEchoMode( QLineEdit::Password ); |
60 | 61 | ||
61 | QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); | 62 | QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); |
62 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); | 63 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); |
63 | pageLayout->addWidget(textLabel1); | 64 | pageLayout->addWidget(textLabel1); |
64 | pageLayout->addWidget(pwLineEdit); | 65 | pageLayout->addWidget(pwLineEdit); |
65 | 66 | ||
66 | QWidget* numberBox = new QWidget( page ); | 67 | QWidget* numberBox = new QWidget( page ); |
67 | #ifndef DESKTOP_VERSION | 68 | #ifndef DESKTOP_VERSION |
68 | numberBox->setFixedHeight(150); | 69 | if ( QApplication::desktop()->width() > 320 ) { |
69 | numberBox->setFixedWidth(150); | 70 | numberBox->setFixedHeight(250); |
71 | numberBox->setFixedWidth(200); | ||
72 | } | ||
73 | else{ | ||
74 | numberBox->setFixedHeight(150); | ||
75 | numberBox->setFixedWidth(150); | ||
76 | } | ||
70 | #endif | 77 | #endif |
71 | 78 | ||
72 | QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); | 79 | QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); |
73 | numberLayout->setMargin( 0 ); | 80 | numberLayout->setMargin( 0 ); |
74 | numberLayout->setSpacing( 0 ); | 81 | numberLayout->setSpacing( 0 ); |
75 | 82 | ||
76 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); | 83 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); |
77 | numberLayout->addWidget( p1, 0, 0 ); | 84 | numberLayout->addWidget( p1, 0, 0 ); |
78 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); | 85 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); |
79 | numberLayout->addWidget( p2, 0, 1 ); | 86 | numberLayout->addWidget( p2, 0, 1 ); |
80 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); | 87 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); |
81 | numberLayout->addWidget( p3, 0, 2 ); | 88 | numberLayout->addWidget( p3, 0, 2 ); |
82 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); | 89 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); |
83 | numberLayout->addWidget( p4, 1, 0 ); | 90 | numberLayout->addWidget( p4, 1, 0 ); |
84 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); | 91 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); |
85 | numberLayout->addWidget( p5, 1, 1 ); | 92 | numberLayout->addWidget( p5, 1, 1 ); |