[Cmake-commits] [cmake-commits] hoffman committed CMakeSetupDialog.cxx 1.40.2.1 1.40.2.2

cmake-commits at cmake.org cmake-commits at cmake.org
Sun Mar 30 09:09:50 EDT 2008


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv4308/Source/QtDialog

Modified Files:
      Tag: CMake-2-6
	CMakeSetupDialog.cxx 
Log Message:
ENH: merge from main tree


Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.40.2.1
retrieving revision 1.40.2.2
diff -C 2 -d -r1.40.2.1 -r1.40.2.2
*** CMakeSetupDialog.cxx	18 Mar 2008 14:23:55 -0000	1.40.2.1
--- CMakeSetupDialog.cxx	30 Mar 2008 13:09:47 -0000	1.40.2.2
***************
*** 394,401 ****
  
    QDialog dialog;
    dialog.setWindowTitle(tr("Help"));
    QVBoxLayout* l = new QVBoxLayout(&dialog);
    QLabel* lab = new QLabel(&dialog);
-   l->addWidget(lab);
    lab->setText(msg);
    lab->setWordWrap(true);
--- 394,403 ----
  
    QDialog dialog;
+   QFontMetrics met(this->font());
+   int msgWidth = met.width(msg);
+   dialog.setMinimumSize(msgWidth/15,20);
    dialog.setWindowTitle(tr("Help"));
    QVBoxLayout* l = new QVBoxLayout(&dialog);
    QLabel* lab = new QLabel(&dialog);
    lab->setText(msg);
    lab->setWordWrap(true);
***************
*** 403,406 ****
--- 405,409 ----
                                                  Qt::Horizontal, &dialog);
    QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept()));
+   l->addWidget(lab);
    l->addWidget(btns);
    dialog.exec();



More information about the Cmake-commits mailing list