summaryrefslogtreecommitdiffstats
path: root/kdm/kfrontend/kfdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdm/kfrontend/kfdialog.cpp')
-rw-r--r--kdm/kfrontend/kfdialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kdm/kfrontend/kfdialog.cpp b/kdm/kfrontend/kfdialog.cpp
index 62a4acb22..78359e237 100644
--- a/kdm/kfrontend/kfdialog.cpp
+++ b/kdm/kfrontend/kfdialog.cpp
@@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <klocale.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
+#include <kglobalsettings.h>
#include <tqlabel.h>
#include <tqlayout.h>
@@ -137,6 +138,9 @@ KFMsgBox::KFMsgBox( TQWidget *parent, TQMessageBox::Icon type, const TQString &t
TQLabel *label1 = new TQLabel( this );
label1->setPixmap( TQMessageBox::standardIcon( type ) );
TQLabel *label2 = new TQLabel( text, this );
+ TQRect d = KGlobalSettings::desktopGeometry(this);
+ if ( label2->fontMetrics().size( 0, text).width() > d.width() * 3 / 5)
+ label2->setAlignment(Qt::WordBreak | Qt::AlignAuto );
KPushButton *button = new KPushButton( KStdGuiItem::ok(), this );
button->setDefault( true );
button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) );