Commit ff976b98 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Fix welcome screen with 120 dpi and translations with overlength

Task-number: QTCREATORBUG-2984
Reviewed-by: dt
parent 09e217f5
......@@ -86,16 +86,29 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent
connect(ui->tutorialTreeWidget, SIGNAL(activated(QString)), SLOT(slotOpenHelpPage(const QString&)));
ui->tutorialTreeWidget->addItem(tr("The Qt Creator User Interface"),
QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html"));
ui->tutorialTreeWidget->addItem(tr("Building and Running an Example"),
QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html?view=split"));
ui->tutorialTreeWidget->addItem(tr("Creating a Qt C++ Application"),
QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-writing-program.html?view=split"));
ui->tutorialTreeWidget->addItem(tr("Creating a Mobile Application"),
QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-mobile-example.html?view=split"));
ui->tutorialTreeWidget->addItem(tr("Creating a Qt Quick Application"),
QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-qml-application.html?view=split"));
QFontMetrics fm = fontMetrics();
const int margins = 30;
int width = ui->tutorialTreeWidget->minimumWidth() - margins;
QString itemText = tr("The Qt Creator User Interface");
QString url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html");
ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText);
itemText = tr("Building and Running an Example");
url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html?view=split");
ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText);
itemText = tr("Creating a Qt C++ Application");
url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-writing-program.html?view=split");
ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText);
itemText = tr("Creating a Mobile Application");
url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-mobile-example.html?view=split");
ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText);
itemText = tr("Creating a Qt Quick Application");
url = QLatin1String("qthelp://com.nokia.qtcreator/doc/creator-qml-application.html?view=split");
ui->tutorialTreeWidget->addItem(fm.elidedText(itemText, Qt::ElideRight, width), url, itemText);
srand(QDateTime::currentDateTime().toTime_t());
QStringList tips = tipsOfTheDay();
......
......@@ -52,7 +52,20 @@
</widget>
</item>
<item row="1" column="0">
<widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget" native="true"/>
<widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget" native="true">
<property name="minimumSize">
<size>
<width>260</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>260</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
......@@ -67,20 +80,26 @@
</property>
<property name="minimumSize">
<size>
<width>230</width>
<width>240</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
<property name="maximumSize">
<size>
<width>240</width>
<height>16777215</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_11">
<property name="leftMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>12</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......@@ -248,6 +267,9 @@
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="topMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="Utils::WelcomeModeLabel" name="demoTitleLabel_4">
<property name="text">
......@@ -316,7 +338,7 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>6</number>
......@@ -368,22 +390,6 @@
</item>
</layout>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
......@@ -457,28 +463,27 @@ border-bottom: 1px solid &quot;#C9C9C9&quot;;
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>38</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="detailsLabel">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="detailsLabel">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment