Added about dialog scaling
authorBartosz Szatkowski <bulislaw@linux.com>
Thu, 19 Aug 2010 10:11:31 +0000 (12:11 +0200)
committerBartosz Szatkowski <bulislaw@linux.com>
Thu, 19 Aug 2010 10:11:31 +0000 (12:11 +0200)
trunk/src/base/gui/AboutWidget.cpp
trunk/src/base/gui/AboutWidget.h

index 369fda9..66c6a78 100644 (file)
@@ -17,21 +17,30 @@ AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
                   "GNU General Public License for more details.<br />"
                   "You should have received a copy of the GNU General Public License\n"
                   "along with this program.  If not, see"
-                  "<a href=\"http://www.gnu.org/licenses/\">"
-                  "&lt;http://www.gnu.org/licenses/&gt;</a>."
+                  "&lt;<a href=\"http://www.gnu.org/licenses/\">"
+                  "http://www.gnu.org/licenses/</a>&gt;."
                   "</p></font>";
 
     setWindowTitle(tr("About"));
+    scroll = new QScrollArea(this);
+    w = new QWidget(this);
+
     mainLayout = new QVBoxLayout(this);
-    setLayout(mainLayout);
+    scrollLayout = new QHBoxLayout(this);
+    scrollLayout->addWidget(w);
+    w->setLayout(mainLayout);
+    scroll->setWidget(w);
+    scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    this->setLayout(scrollLayout);
+
 
     imageLabel = new QLabel(this);
     mainLabel = new QLabel(this);
     licenseLabel = new QLabel(this);
+
     mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
     mainLayout->addWidget(mainLabel);
     mainLayout->addWidget(licenseLabel);
-    mainLabel->setOpenExternalLinks(true);
 
     QImage img(":/icons/mdictionary.png");
     imageLabel->setPixmap(QPixmap::fromImage(img));
@@ -39,12 +48,12 @@ AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
     imageLabel->setMinimumSize(imageLabel->pixmap()->size());
 
     mainLabel->setText(infoNote + comarchNote);
+    mainLabel->setOpenExternalLinks(true);
 
     licenseLabel->setText(licenseNote);
     licenseLabel->setWordWrap(true);
     licenseLabel->setOpenExternalLinks(true);
-    this->repaint();
-    this->update();
+
 
     #ifdef Q_WS_MAEMO_5
         mainLayout->addSpacing(20);
index 6bfa069..0e40457 100644 (file)
@@ -13,7 +13,10 @@ public:
     AboutWidget(GUIInterface *parent = 0);
 private:
     QVBoxLayout* mainLayout;
+    QHBoxLayout *scrollLayout;
     QLabel* mainLabel, * licenseLabel, *imageLabel;
+    QScrollArea* scroll;
+    QWidget* w;
 
 
 };