diff --git a/src/libs/utils/welcomemodetreewidget.cpp b/src/libs/utils/welcomemodetreewidget.cpp index 2d9ebaa4dd358462f9a3d24bd568d3da4e7cdbc5..df85bd00c5e4fcd630c8786ec68e2301a0561e15 100644 --- a/src/libs/utils/welcomemodetreewidget.cpp +++ b/src/libs/utils/welcomemodetreewidget.cpp @@ -40,11 +40,11 @@ void WelcomeModeLabel::setStyledText(const QString &text) { QString rc = QLatin1String( "<html><head><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head>" - "<body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">" + "<body style=\" font-weight:500; font-style:normal;\">" "<p style=\" margin-top:16px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">" - "<span style=\" font-size:x-large; color:#555555;\">"); + "<span style=\" font-size:large; color:#555555;\">"); rc += text; - rc += QLatin1String("</span></p><hr/></body></html>"); + rc += QLatin1String("</span></p></body></html>"); setText(rc); } diff --git a/src/plugins/projectexplorer/projectwelcomepagewidget.cpp b/src/plugins/projectexplorer/projectwelcomepagewidget.cpp index f1332e03cbb2090eb245fb7238d8e46c07b27a71..46bc3e0dabcbf7875662c72e431803d5bce2c6f5 100644 --- a/src/plugins/projectexplorer/projectwelcomepagewidget.cpp +++ b/src/plugins/projectexplorer/projectwelcomepagewidget.cpp @@ -76,7 +76,7 @@ ProjectWelcomePageWidget::ProjectWelcomePageWidget(QWidget *parent) : ui(new Ui::ProjectWelcomePageWidget) { ui->setupUi(this); - ui->projTitleLabel->setStyledText(tr("Open Recent Project")); + ui->projTitleLabel->setStyledText(tr("Recent Projects")); ui->recentSessionsTitleLabel->setStyledText(tr("Resume Session")); updateWelcomePage(WelcomePageData()); diff --git a/src/plugins/projectexplorer/projectwelcomepagewidget.ui b/src/plugins/projectexplorer/projectwelcomepagewidget.ui index cb94d9b53bc70e787f6f4c8e2419aa45539b8a84..23b5bc84a13679140314069bd38268fef7c1d4b3 100644 --- a/src/plugins/projectexplorer/projectwelcomepagewidget.ui +++ b/src/plugins/projectexplorer/projectwelcomepagewidget.ui @@ -13,231 +13,320 @@ <property name="windowTitle"> <string>Form</string> </property> - <layout class="QHBoxLayout" name="horizontalLayout"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="topMargin"> + <number>9</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> <item> - <widget class="QFrame" name="recentSessionsFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>270</width> - <height>130</height> - </size> - </property> + <widget class="QFrame" name="frame"> <property name="styleSheet"> - <string/> + <string notr="true">#frame{ + border: 1px solid #c9c9c9; + border-radius: 3px; + padding: 2px; + background: #f9f9f9; + margin: 1px; +}</string> </property> - <layout class="QGridLayout" name="gridLayout_3"> - <property name="horizontalSpacing"> - <number>0</number> - </property> - <property name="verticalSpacing"> - <number>3</number> - </property> - <item row="0" column="0" colspan="3"> - <widget class="Utils::WelcomeModeLabel" name="recentSessionsTitleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> - <widget class="Utils::WelcomeModeTreeWidget" name="sessTreeWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::NoSelection</enum> - </property> - <property name="verticalScrollMode"> - <enum>QAbstractItemView::ScrollPerPixel</enum> - </property> - <property name="rootIsDecorated"> - <bool>false</bool> - </property> - <property name="uniformRowHeights"> - <bool>true</bool> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> - </property> - <property name="columnCount"> - <number>2</number> - </property> - <attribute name="headerVisible"> - <bool>false</bool> - </attribute> - <attribute name="headerDefaultSectionSize"> - <number>24</number> - </attribute> - <attribute name="headerMinimumSectionSize"> - <number>0</number> - </attribute> - <column> - <property name="text"> - <string notr="true">1</string> - </property> - </column> - <column> - <property name="text"> - <string notr="true">2</string> - </property> - </column> - </widget> - </item> - <item row="3" column="0"> - <widget class="QPushButton" name="manageSessionsButton"> - <property name="focusPolicy"> - <enum>Qt::TabFocus</enum> - </property> - <property name="text"> - <string>Manage Sessions...</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="recentProjectsFrame"> - <property name="styleSheet"> - <string/> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> </property> - <layout class="QGridLayout" name="gridLayout_5"> - <property name="horizontalSpacing"> - <number>0</number> - </property> - <property name="verticalSpacing"> - <number>3</number> - </property> - <property name="rightMargin"> - <number>9</number> - </property> - <item row="0" column="0" colspan="3"> - <widget class="Utils::WelcomeModeLabel" name="projTitleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> - <widget class="Utils::WelcomeModeTreeWidget" name="projTreeWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::NoSelection</enum> - </property> - <property name="verticalScrollMode"> - <enum>QAbstractItemView::ScrollPerPixel</enum> - </property> - <property name="rootIsDecorated"> - <bool>false</bool> - </property> - <property name="uniformRowHeights"> - <bool>true</bool> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> - </property> - <property name="columnCount"> - <number>2</number> - </property> - <attribute name="headerVisible"> - <bool>false</bool> - </attribute> - <attribute name="headerDefaultSectionSize"> - <number>24</number> - </attribute> - <attribute name="headerMinimumSectionSize"> - <number>0</number> - </attribute> - <column> - <property name="text"> - <string notr="true">1</string> - </property> - </column> - <column> - <property name="text"> - <string notr="true">2</string> - </property> - </column> - </widget> - </item> - <item row="3" column="0"> - <widget class="QPushButton" name="createNewProjectButton"> - <property name="focusPolicy"> - <enum>Qt::TabFocus</enum> - </property> - <property name="text"> - <string>Create New Project...</string> - </property> - <property name="flat"> - <bool>false</bool> - </property> - </widget> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QFrame" name="recentProjectsFrame"> + <property name="styleSheet"> + <string/> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <property name="horizontalSpacing"> + <number>0</number> + </property> + <property name="verticalSpacing"> + <number>3</number> + </property> + <property name="rightMargin"> + <number>9</number> + </property> + <item row="3" column="0" colspan="3"> + <widget class="Utils::WelcomeModeTreeWidget" name="projTreeWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::NoSelection</enum> + </property> + <property name="verticalScrollMode"> + <enum>QAbstractItemView::ScrollPerPixel</enum> + </property> + <property name="rootIsDecorated"> + <bool>false</bool> + </property> + <property name="uniformRowHeights"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <property name="columnCount"> + <number>2</number> + </property> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <column> + <property name="text"> + <string notr="true">1</string> + </property> + </column> + <column> + <property name="text"> + <string notr="true">2</string> + </property> + </column> + </widget> + </item> + <item row="6" column="0"> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0" colspan="3"> + <widget class="Utils::WelcomeModeLabel" name="projTitleLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="recentSessionsFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>270</width> + <height>130</height> + </size> + </property> + <property name="styleSheet"> + <string/> + </property> + <layout class="QGridLayout" name="gridLayout_3"> + <property name="horizontalSpacing"> + <number>0</number> + </property> + <property name="verticalSpacing"> + <number>3</number> + </property> + <item row="1" column="0" colspan="3"> + <widget class="Utils::WelcomeModeLabel" name="recentSessionsTitleLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + </widget> + </item> + <item row="3" column="0" colspan="3"> + <widget class="Utils::WelcomeModeTreeWidget" name="sessTreeWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::NoSelection</enum> + </property> + <property name="verticalScrollMode"> + <enum>QAbstractItemView::ScrollPerPixel</enum> + </property> + <property name="rootIsDecorated"> + <bool>false</bool> + </property> + <property name="uniformRowHeights"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <property name="columnCount"> + <number>2</number> + </property> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <column> + <property name="text"> + <string notr="true">1</string> + </property> + </column> + <column> + <property name="text"> + <string notr="true">2</string> + </property> + </column> + </widget> + </item> + <item row="6" column="0"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> </item> - <item row="4" column="0"> - <spacer name="verticalSpacer_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>6</number> </property> - </spacer> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="manageSessionsButton"> + <property name="minimumSize"> + <size> + <width>180</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::TabFocus</enum> + </property> + <property name="text"> + <string>Manage Sessions...</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="createNewProjectButton"> + <property name="minimumSize"> + <size> + <width>180</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::TabFocus</enum> + </property> + <property name="text"> + <string>Create Project...</string> + </property> + <property name="icon"> + <iconset resource="../coreplugin/core.qrc"> + <normaloff>:/core/images/filenew.png</normaloff>:/core/images/filenew.png</iconset> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> </item> </layout> + <zorder></zorder> + <zorder>layoutWidget</zorder> + <zorder>horizontalSpacer_2</zorder> + <zorder>horizontalSpacer_2</zorder> </widget> </item> </layout> @@ -254,6 +343,8 @@ <header>utils/welcomemodetreewidget.h</header> </customwidget> </customwidgets> - <resources/> + <resources> + <include location="../coreplugin/core.qrc"/> + </resources> <connections/> </ui> diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp index 3b479af45cea5b2555b45362054b5e1a3673907c..305052d2a4552f8e301fdd37e967c0d598173619 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp @@ -71,16 +71,12 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent connect(ui->tutorialTreeWidget, SIGNAL(activated(QString)), SLOT(slotOpenHelpPage(const QString&))); - ui->tutorialTreeWidget->addItem(tr("<b>Qt Creator - A quick tour</b>"), + ui->tutorialTreeWidget->addItem(tr("The Qt Creator User Interface"), QString("qthelp://com.nokia.qtcreator.%1%2/doc/index.html").arg(IDE_VERSION_MAJOR).arg(IDE_VERSION_MINOR)); - ui->tutorialTreeWidget->addItem(tr("Creating an address book"), + 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 Qt Quick Application"), QLatin1String("qthelp://com.nokia.qtcreator/doc/tutorials-addressbook-sdk.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Understanding widgets"), - QLatin1String("qthelp://com.trolltech.qt/qdoc/widgets-tutorial.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Building with qmake"), - QLatin1String("qthelp://com.trolltech.qmake/qdoc/qmake-tutorial.html?view=split")); - ui->tutorialTreeWidget->addItem(tr("Writing test cases"), - QLatin1String("qthelp://com.trolltech.qt/qdoc/qtestlib-tutorial.html?view=split")); srand(QDateTime::currentDateTime().toTime_t()); QStringList tips = tipsOfTheDay(); @@ -93,7 +89,7 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent connect(ui->nextTipBtn, SIGNAL(clicked()), this, SLOT(slotNextTip())); connect(ui->prevTipBtn, SIGNAL(clicked()), this, SLOT(slotPrevTip())); - + connect(ui->createNewProjectButton, SIGNAL(clicked()), this, SLOT(slotCreateNewProject())); } GettingStartedWelcomePageWidget::~GettingStartedWelcomePageWidget() @@ -278,6 +274,12 @@ void GettingStartedWelcomePageWidget::slotOpenContextHelpPage(const QString& url helpManager->handleHelpRequest(url % QLatin1String("?view=split")); } +void GettingStartedWelcomePageWidget::slotCreateNewProject() +{ + Core::ICore::instance()->showNewItemDialog(tr("New Project..."), + Core::IWizard::wizardsOfKind(Core::IWizard::ProjectWizard)); +} + void GettingStartedWelcomePageWidget::slotNextTip() { QStringList tips = tipsOfTheDay(); diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.h b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.h index a2e981c70f5d66909b7a406c99af31ab9a29809d..d3b59b6254498a730d4a05cc83967b0f2130a403 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.h +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.h @@ -57,6 +57,7 @@ private slots: void slotOpenExample(); void slotNextTip(); void slotPrevTip(); + void slotCreateNewProject(); private: QStringList tipsOfTheDay(); diff --git a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui index facd533e3aca0b671745af71b57f6cdf84026edf..5a47cbf41215c6d92ed3590a397e2c5d1b636580 100644 --- a/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui +++ b/src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.ui @@ -13,290 +13,373 @@ <property name="windowTitle"> <string>Form</string> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0" rowspan="2"> - <widget class="QFrame" name="tutorialsFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>400</width> - <height>16777215</height> - </size> - </property> + <layout class="QGridLayout" name="gridLayout_2"> + <property name="bottomMargin"> + <number>2</number> + </property> + <item row="2" column="0"> + <widget class="QFrame" name="contentframe"> <property name="styleSheet"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_6"> - <item row="0" column="0"> - <widget class="Utils::WelcomeModeLabel" name="tutorialsTitleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>Qt::NoFocus</enum> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::NoSelection</enum> - </property> - <property name="verticalScrollMode"> - <enum>QAbstractItemView::ScrollPerPixel</enum> - </property> - <property name="rootIsDecorated"> - <bool>false</bool> - </property> - <property name="uniformRowHeights"> - <bool>true</bool> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> - </property> - <property name="columnCount"> - <number>2</number> - </property> - <attribute name="headerVisible"> - <bool>false</bool> - </attribute> - <attribute name="headerDefaultSectionSize"> - <number>24</number> - </attribute> - <attribute name="headerMinimumSectionSize"> - <number>0</number> - </attribute> - <attribute name="headerDefaultSectionSize"> - <number>24</number> - </attribute> - <attribute name="headerVisible"> - <bool>false</bool> - </attribute> - <attribute name="headerMinimumSectionSize"> - <number>0</number> - </attribute> - <column> - <property name="text"> - <string notr="true">1</string> - </property> - </column> - <column> - <property name="text"> - <string notr="true">2</string> - </property> - </column> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="1"> - <widget class="QFrame" name="demosExamplesFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <string notr="true">#contentframe{ + border: 1px solid #c9c9c9; + border-radius: 3px; + padding: 2px; + background: #f9f9f9; + margin: 1px; +}</string> </property> - <property name="maximumSize"> - <size> - <width>400</width> - <height>16777215</height> - </size> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> </property> - <property name="styleSheet"> - <string/> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> </property> - <layout class="QGridLayout" name="gridLayout_8"> - <property name="rightMargin"> - <number>8</number> - </property> - <property name="horizontalSpacing"> - <number>0</number> - </property> - <item row="0" column="0" colspan="3"> - <widget class="Utils::WelcomeModeLabel" name="demoTitleLabel"> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QPushButton" name="examplesButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Examples not installed...</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="1" column="1"> - <widget class="QFrame" name="didyouKnowFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>400</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_11"> - <property name="rightMargin"> - <number>9</number> - </property> + <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0"> - <widget class="Utils::WelcomeModeLabel" name="didYouKnowTitleLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - </widget> - </item> - <item row="1" column="0" colspan="2"> - <widget class="QTextBrowser" name="didYouKnowTextBrowser"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Plain</enum> - </property> - <property name="verticalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <property name="horizontalScrollBarPolicy"> - <enum>Qt::ScrollBarAlwaysOff</enum> - </property> - <property name="openExternalLinks"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <layout class="QGridLayout" name="gridLayout_10"> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0" colspan="2"> - <spacer name="verticalSpacer_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Preferred</enum> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0" rowspan="2"> + <widget class="QFrame" name="tutorialsFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="sizeHint" stdset="0"> + <property name="maximumSize"> <size> - <width>20</width> - <height>2</height> + <width>400</width> + <height>16777215</height> </size> </property> - </spacer> - </item> - <item row="1" column="0"> - <widget class="QToolButton" name="prevTipBtn"> <property name="styleSheet"> - <string notr="true">QToolButton{ - border-right:solid 0 px; - height:16px; - width:12px; -} -</string> - </property> - <property name="text"> <string/> </property> - <property name="icon"> - <iconset resource="../welcome/welcome.qrc"> - <normaloff>:/welcome/images/arrow-left.png</normaloff>:/welcome/images/arrow-left.png</iconset> + <layout class="QGridLayout" name="gridLayout_6"> + <property name="verticalSpacing"> + <number>12</number> + </property> + <item row="0" column="0"> + <widget class="Utils::WelcomeModeLabel" name="tutorialsTitleLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="Utils::WelcomeModeTreeWidget" name="tutorialTreeWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::NoSelection</enum> + </property> + <property name="verticalScrollMode"> + <enum>QAbstractItemView::ScrollPerPixel</enum> + </property> + <property name="rootIsDecorated"> + <bool>false</bool> + </property> + <property name="uniformRowHeights"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <property name="columnCount"> + <number>2</number> + </property> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <attribute name="headerDefaultSectionSize"> + <number>24</number> + </attribute> + <attribute name="headerVisible"> + <bool>false</bool> + </attribute> + <attribute name="headerMinimumSectionSize"> + <number>0</number> + </attribute> + <column> + <property name="text"> + <string notr="true">1</string> + </property> + </column> + <column> + <property name="text"> + <string notr="true">2</string> + </property> + </column> + </widget> + </item> + </layout> + </widget> + </item> + <item row="0" column="1"> + <widget class="QFrame" name="demosExamplesFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>400</width> + <height>16777215</height> + </size> </property> - <property name="arrowType"> - <enum>Qt::NoArrow</enum> + <property name="styleSheet"> + <string/> </property> + <layout class="QGridLayout" name="gridLayout_8"> + <property name="rightMargin"> + <number>8</number> + </property> + <property name="horizontalSpacing"> + <number>0</number> + </property> + <item row="1" column="0"> + <widget class="Utils::WelcomeModeLabel" name="demoTitleLabel"> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QPushButton" name="examplesButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string>Examples not installed...</string> + </property> + </widget> + </item> + </layout> </widget> </item> <item row="1" column="1"> - <widget class="QToolButton" name="nextTipBtn"> + <widget class="QFrame" name="didyouKnowFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>400</width> + <height>16777215</height> + </size> + </property> <property name="styleSheet"> - <string notr="true">QToolButton{ + <string/> + </property> + <layout class="QGridLayout" name="gridLayout_11"> + <property name="verticalSpacing"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>9</number> + </property> + <item row="0" column="0"> + <widget class="Utils::WelcomeModeLabel" name="didYouKnowTitleLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + </widget> + </item> + <item row="0" column="1"> + <layout class="QGridLayout" name="gridLayout_10"> + <property name="spacing"> + <number>0</number> + </property> + <item row="0" column="0" colspan="2"> + <spacer name="verticalSpacer_4"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>2</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0"> + <widget class="QToolButton" name="prevTipBtn"> + <property name="styleSheet"> + <string notr="true">QToolButton{ + border-right:solid 0 px; + height:16px; + width:12px; +} +</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../welcome/welcome.qrc"> + <normaloff>:/welcome/images/arrow-left.png</normaloff>:/welcome/images/arrow-left.png</iconset> + </property> + <property name="arrowType"> + <enum>Qt::NoArrow</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QToolButton" name="nextTipBtn"> + <property name="styleSheet"> + <string notr="true">QToolButton{ border-left:solid 0 px; height:16px; width:12px; } </string> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="../welcome/welcome.qrc"> - <normaloff>:/welcome/images/arrow-right.png</normaloff>:/welcome/images/arrow-right.png</iconset> - </property> - <property name="arrowType"> - <enum>Qt::NoArrow</enum> - </property> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="../welcome/welcome.qrc"> + <normaloff>:/welcome/images/arrow-right.png</normaloff>:/welcome/images/arrow-right.png</iconset> + </property> + <property name="arrowType"> + <enum>Qt::NoArrow</enum> + </property> + </widget> + </item> + <item row="2" column="0" colspan="2"> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>2</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="1" column="0" colspan="2"> + <widget class="QTextBrowser" name="didYouKnowTextBrowser"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> </widget> </item> - <item row="2" column="0" colspan="2"> - <spacer name="verticalSpacer_3"> + </layout> + </item> + <item row="1" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>6</number> + </property> + <item> + <spacer name="horizontalSpacer_2"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>20</width> - <height>2</height> + <width>40</width> + <height>20</height> </size> </property> </spacer> </item> + <item> + <widget class="QPushButton" name="createNewProjectButton"> + <property name="minimumSize"> + <size> + <width>180</width> + <height>40</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::TabFocus</enum> + </property> + <property name="text"> + <string>Create Project...</string> + </property> + <property name="icon"> + <iconset resource="../coreplugin/core.qrc"> + <normaloff>:/core/images/filenew.png</normaloff>:/core/images/filenew.png</iconset> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> </layout> </item> </layout> @@ -317,6 +400,7 @@ </customwidget> </customwidgets> <resources> + <include location="../coreplugin/core.qrc"/> <include location="../welcome/welcome.qrc"/> </resources> <connections/> diff --git a/src/plugins/welcome/images/background_center_frame.png b/src/plugins/welcome/images/background_center_frame.png index d1628e22c27b47cc1f75a3ff054c7232f7ac0208..c69f1447283362f2924228071be74b6cd04d41b7 100644 Binary files a/src/plugins/welcome/images/background_center_frame.png and b/src/plugins/welcome/images/background_center_frame.png differ diff --git a/src/plugins/welcome/welcomemode.cpp b/src/plugins/welcome/welcomemode.cpp index 01afc50316be38548d58d9b03569dc894537383c..31ffc19be2232fb152afaf5708f23835ffe35525 100644 --- a/src/plugins/welcome/welcomemode.cpp +++ b/src/plugins/welcome/welcomemode.cpp @@ -172,8 +172,6 @@ void WelcomeMode::initPlugins() if (debug) qDebug() << "WelcomeMode::initPlugins" << plugin->title(); } - m_d->buttonLayout->addSpacing(5); - QSettings *settings = Core::ICore::instance()->settings(); const int tabId = settings->value(QLatin1String(currentPageSettingsKeyC), 0).toInt(); diff --git a/src/plugins/welcome/welcomemode.ui b/src/plugins/welcome/welcomemode.ui index 648ed840292b288e8d2d931d3b3ef04a231b5bc6..14a1189a7ff544c43299ecd41a34038155cdb6a0 100644 --- a/src/plugins/welcome/welcomemode.ui +++ b/src/plugins/welcome/welcomemode.ui @@ -33,7 +33,6 @@ QToolButton, QPushButton, QComboBox { QComboBox::down-arrow { image: url(:/welcome/images/combobox_arrow.png); } - QComboBox:drop-down { subcontrol-origin: padding; @@ -54,6 +53,17 @@ QToolButton:disabled, QPushButton:disabled, QComboBox::disabled { QToolButton:pressed, QPushButton:pressed{ border-image: url(:/welcome/images/btn_26_pressed.png) 4; } + + QPushButton::menu-indicator{ + subcontrol-origin: margin; + subcontrol-position: center right; + right: 4px; + } + + QPushButton{ + outline: none; + margin: 2 + } </string> </property> <layout class="QVBoxLayout" name="verticalLayout_4"> @@ -66,13 +76,19 @@ QToolButton:pressed, QPushButton:pressed{ <item> <widget class="QWidget" name="gradientWidget" native="true"> <property name="styleSheet"> - <string>#gradientWidget { + <string notr="true">/* +#gradientWidget { background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(215, 215, 215, 255)); -}</string> +} +*/ +#gradientWidget { + border-image: url(:/core/images/welcomebg.png) 4; +} +</string> </property> <layout class="QGridLayout" name="gridLayout"> <property name="leftMargin"> - <number>4</number> + <number>0</number> </property> <property name="topMargin"> <number>4</number> @@ -91,19 +107,21 @@ QToolButton:pressed, QPushButton:pressed{ <property name="minimumSize"> <size> <width>662</width> - <height>515</height> + <height>490</height> </size> </property> <property name="maximumSize"> <size> <width>662</width> - <height>16777215</height> + <height>490</height> </size> </property> <property name="styleSheet"> <string notr="true">#mainFrame { - border-image: url(:/welcome/images/background_center_frame.png) 4; + border-image: url(:/welcome/images/background_center_frame.png); border-width: 4; + padding:-3; + padding-bottom:20 ; } </string> </property> @@ -255,29 +273,32 @@ QToolButton:pressed { </item> <item> <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>8</number> + </property> + <property name="topMargin"> + <number>1</number> + </property> <property name="rightMargin"> - <number>20</number> + <number>13</number> </property> <property name="bottomMargin"> - <number>17</number> + <number>10</number> </property> <item> - <spacer name="horizontalSpacer_5"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <widget class="QPushButton" name="feedbackButton"> + <property name="focusPolicy"> + <enum>Qt::TabFocus</enum> </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> + <property name="styleSheet"> + <string notr="true">height:19px;</string> </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="helpUsLabel"> <property name="text"> - <string>Help us make Qt Creator even better</string> + <string>Feedback</string> + </property> + <property name="icon"> + <iconset resource="welcome.qrc"> + <normaloff>:/welcome/images/feedback_arrow.png</normaloff>:/welcome/images/feedback_arrow.png</iconset> </property> </widget> </item> @@ -298,22 +319,116 @@ QToolButton:pressed { </spacer> </item> <item> - <widget class="QPushButton" name="feedbackButton"> - <property name="focusPolicy"> - <enum>Qt::TabFocus</enum> - </property> - <property name="styleSheet"> - <string notr="true">height:19px;</string> + <widget class="QLabel" name="helpUsLabel"> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="Text"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + <colorrole role="ButtonText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>0</red> + <green>0</green> + <blue>0</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> </property> <property name="text"> - <string>Feedback</string> - </property> - <property name="icon"> - <iconset resource="welcome.qrc"> - <normaloff>:/welcome/images/feedback_arrow.png</normaloff>:/welcome/images/feedback_arrow.png</iconset> + <string>Help us make Qt Creator even better</string> </property> </widget> </item> + <item> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </item> </layout>