From 1039f2df32eb011fd4013167ac20ecdc607e1c7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 15 Sep 2011 07:33:07 +0000 Subject: Enhance SAK appearance git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253791 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/lock/sakdlg.cc | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) (limited to 'kdesktop/lock/sakdlg.cc') diff --git a/kdesktop/lock/sakdlg.cc b/kdesktop/lock/sakdlg.cc index 719f2122f..1647fb527 100644 --- a/kdesktop/lock/sakdlg.cc +++ b/kdesktop/lock/sakdlg.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -81,13 +82,12 @@ SAKDlg::SAKDlg(LockProcess *parent) frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setLineWidth( 2 ); - mpixLabel = new TQLabel( frame, "pixlabel" ); - mpixLabel->setPixmap(DesktopIcon("unlock")); + KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame ); KUser user; mStatusLabel = new TQLabel( " ", frame ); - mStatusLabel->tqsetAlignment( TQLabel::AlignCenter ); + mStatusLabel->tqsetAlignment( TQLabel::AlignVCenter ); TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this ); unlockDialogLayout->addWidget( frame ); @@ -96,11 +96,10 @@ SAKDlg::SAKDlg(LockProcess *parent) layStatus->addWidget( mStatusLabel ); frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); - frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, Qt::AlignTop ); - frameLayout->addLayout( layStatus, 1, 1 ); + frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, Qt::AlignTop | AlignHCenter ); + frameLayout->addMultiCellLayout( layStatus, 1, 1, 0, 1, AlignHCenter | AlignVCenter); - setKDEIcon(); - mStatusLabel->setText("" + i18n("Press Ctrl+Alt+Del to begin.") + ""); + mStatusLabel->setText("" + i18n("Press Ctrl+Alt+Del to begin.") + "

" + i18n("This process helps keep your password secure.") + "
" + i18n("It prevents unauthorized users from emulating the login screen.")); installEventFilter(this); @@ -126,6 +125,11 @@ SAKDlg::~SAKDlg() hide(); } +void SAKDlg::closeDialogForced() +{ + TQDialog::reject(); +} + void SAKDlg::reject() { @@ -137,31 +141,6 @@ void SAKDlg::updateLabel(TQString &txt) mStatusLabel->setText("" + txt + ""); } -void SAKDlg::setUnlockIcon() -{ - mpixLabel->setPixmap(DesktopIcon("unlock")); -} - -void SAKDlg::setKDEIcon() -{ - mpixLabel->setPixmap(DesktopIcon("about_kde")); -} - -void SAKDlg::setInfoIcon() -{ - mpixLabel->setPixmap(DesktopIcon("messagebox_info")); -} - -void SAKDlg::setWarningIcon() -{ - mpixLabel->setPixmap(DesktopIcon("messagebox_warning")); -} - -void SAKDlg::setErrorIcon() -{ - mpixLabel->setPixmap(DesktopIcon("messagebox_critical")); -} - void SAKDlg::show() { TQDialog::show(); -- cgit v1.2.1