Commit 2d17da65 authored by con's avatar con
Browse files

Icon update.

parent fb3cc114
......@@ -37,6 +37,7 @@ leave room for the Qt 4 target page.
<wizard version="1" kind="project"
class="qt4project" firstpage="10"
id="QmlRuntimePlugin" category="F.Projects">
<icon>lib.png</icon>
<description>Creates a C++ plugin to extend the funtionality of the QML runtime.</description>
<displayname>QML Runtime Plug-in</displayname>
<displaycategory>QML Runtime Plug-in</displaycategory>
......
......@@ -59,5 +59,11 @@
<file>images/darkclose.png</file>
<file>images/arrowdown.png</file>
<file>images/arrowup.png</file>
<file>images/category_fakevim.png</file>
<file>images/category_locator.png</file>
<file>images/category_cpaster.png</file>
<file>images/category_cpp.png</file>
<file>images/category_vcs.png</file>
<file>images/category_qml.png</file>
</qresource>
</RCC>
......@@ -50,6 +50,8 @@ Q_DECLARE_METATYPE(Core::IWizard*)
namespace {
const int ICON_SIZE = 22;
class TwoLevelProxyModel : public QAbstractProxyModel
{
// Q_OBJECT
......@@ -166,7 +168,7 @@ NewDialog::NewDialog(QWidget *parent) :
m_ui->templateCategoryView->setEditTriggers(QAbstractItemView::NoEditTriggers);
m_ui->templateCategoryView->setItemDelegate(new FancyTopLevelDelegate);
m_ui->templatesView->setIconSize(QSize(22, 22));
m_ui->templatesView->setIconSize(QSize(ICON_SIZE, ICON_SIZE));
connect(m_ui->templateCategoryView, SIGNAL(clicked(const QModelIndex&)),
this, SLOT(currentCategoryChanged(const QModelIndex&)));
......@@ -218,7 +220,7 @@ void NewDialog::setWizards(QList<IWizard*> wizards)
parentItem->appendRow(filesClassesKindItem);
if (m_dummyIcon.isNull()) {
m_dummyIcon = QPixmap(22, 22);
m_dummyIcon = QPixmap(ICON_SIZE, ICON_SIZE);
m_dummyIcon.fill(Qt::transparent);
}
......@@ -251,10 +253,11 @@ void NewDialog::setWizards(QList<IWizard*> wizards)
QIcon wizardIcon;
// spacing hack. Add proper icons instead
if (wizard->icon().isNull())
if (wizard->icon().isNull()) {
wizardIcon = m_dummyIcon;
else
} else {
wizardIcon = wizard->icon();
}
wizardItem->setIcon(wizardIcon);
wizardItem->setData(QVariant::fromValue(wizard), Qt::UserRole);
wizardItem->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
......
......@@ -79,7 +79,7 @@ QString CodePasterSettingsPage::displayCategory() const
QIcon CodePasterSettingsPage::categoryIcon() const
{
return QIcon(); // TODO: Add icon for code paster category
return QIcon();
}
QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
......
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