Commit 5910b7de authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlDesigner.Navigator: Smaller icons

parent fe6ada65
......@@ -73,12 +73,13 @@ public:
if (option->state & QStyle::State_Selected) {
drawSelectionBackground(painter, *option);
} else {
painter->save();
painter->setPen(QColor(255, 255, 255, 15));
painter->drawLine(option->rect.topLeft(), option->rect.topRight());
painter->setPen(QColor(0, 0, 0, 25));
painter->drawLine(option->rect.bottomLeft(),option->rect.bottomRight());
painter->restore();
// // 3D shadows
// painter->save();
// painter->setPen(QColor(255, 255, 255, 15));
// painter->drawLine(option->rect.topLeft(), option->rect.topRight());
// painter->setPen(QColor(0, 0, 0, 25));
// painter->drawLine(option->rect.bottomLeft(),option->rect.bottomRight());
// painter->restore();
}
} else if (element == PE_IndicatorItemViewItemDrop) {
painter->save();
......@@ -126,7 +127,7 @@ QSize IconCheckboxItemDelegate::sizeHint(const QStyleOptionViewItem &option,
{
Q_UNUSED(option);
Q_UNUSED(index);
return QSize(15,28);
return QSize(15,20);
}
void IconCheckboxItemDelegate::paint(QPainter *painter,
......@@ -144,9 +145,9 @@ void IconCheckboxItemDelegate::paint(QPainter *painter,
painter->setOpacity(0.5);
if (isChecked)
painter->drawPixmap(option.rect.x()+2,option.rect.y()+5,onPix);
painter->drawPixmap(option.rect.x()+2,option.rect.y()+2,onPix);
else
painter->drawPixmap(option.rect.x()+2,option.rect.y()+5,offPix);
painter->drawPixmap(option.rect.x()+2,option.rect.y()+2,offPix);
}
painter->restore();
}
......@@ -182,7 +183,7 @@ void IdItemDelegate::paint(QPainter *painter,
}
// If no icon is present, leave an empty space of 24 pixels anyway
int pixmapSide = 24;
int pixmapSide = 16;
QPixmap pixmap = icon.pixmap(pixmapSide, pixmapSide);
painter->drawPixmap(option.rect.x()+1,option.rect.y()+2,pixmap);
......@@ -195,7 +196,7 @@ void IdItemDelegate::paint(QPainter *painter,
QFontMetrics fm(option.font);
myString = fm.elidedText(myString,Qt::ElideMiddle,option.rect.width()-extraSpace);
painter->drawText(option.rect.bottomLeft()+QPoint(5+pixmapSide,-9),myString);
painter->drawText(option.rect.bottomLeft()+QPoint(5+pixmapSide,-5),myString);
painter->restore();
}
......
<metainfo>
<node name="Qt/Item" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/item-icon.png">
<node name="Qt/Item" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/item-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="600"/>
<propertyDefaultValue name="height" type="int" defaultValue="400"/>
<itemlibraryrepresentation name="Item" icon=":/fxplugin/images/item-icon.png">
......@@ -7,14 +7,14 @@
<property name="height" type="int" value="200"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Rectangle" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/rect-icon.png">
<node name="Qt/Rectangle" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/rect-icon16.png">
<itemlibraryrepresentation name="Rectangle" icon=":/fxplugin/images/rect-icon.png">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="100"/>
<property name="color" type="QColor" value="#ffffff"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Text" showInItemLibrary="true" category="Qt - Basic" icon=":/fxplugin/images/text-icon.png">
<node name="Qt/Text" showInItemLibrary="true" category="Qt - Basic" icon=":/fxplugin/images/text-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="80"/>
<propertyDefaultValue name="height" type="int" defaultValue="20"/>
<itemlibraryrepresentation name="Text" icon=":/fxplugin/images/text-icon.png">
......@@ -23,7 +23,7 @@
<property name="text" type="QString" value="text"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/TextEdit" showInItemLibrary="true" category="Qt - Basic" isContainer="false" icon=":/fxplugin/images/text-edit-icon.png">
<node name="Qt/TextEdit" showInItemLibrary="true" category="Qt - Basic" isContainer="false" icon=":/fxplugin/images/text-edit-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="80"/>
<propertyDefaultValue name="height" type="int" defaultValue="20"/>
<itemlibraryrepresentation name="Text Edit" icon=":/fxplugin/images/text-edit-icon.png">
......@@ -32,7 +32,7 @@
<property name="text" type="QString" value="textEdit"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/TextInput" showInItemLibrary="true" category="Qt - Basic" isContainer="false" icon=":/fxplugin/images/text-input-icon.png">
<node name="Qt/TextInput" showInItemLibrary="true" category="Qt - Basic" isContainer="false" icon=":/fxplugin/images/text-input-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="80"/>
<propertyDefaultValue name="height" type="int" defaultValue="20"/>
<itemlibraryrepresentation name="Text Input" icon=":/fxplugin/images/text-input-icon.png">
......@@ -41,14 +41,14 @@
<property name="text" type="QString" value="textInput"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/MouseArea" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/mouse-area-icon.png">
<node name="Qt/MouseArea" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/mouse-area-icon16.png">
<inherits name="Item" />
<itemlibraryrepresentation name="Mouse Area" icon=":/fxplugin/images/mouse-area-icon.png">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="100"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Image" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/image-icon.png">
<node name="Qt/Image" showInItemLibrary="true" category="Qt - Basic" isContainer="true" icon=":/fxplugin/images/image-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="200"/>
<propertyDefaultValue name="height" type="int" defaultValue="200"/>
<itemlibraryrepresentation name="Image" icon=":/fxplugin/images/image-icon.png">
......@@ -57,7 +57,7 @@
<property name="source" type="QUrl" value="qrc:/fxplugin/images/template_image.png"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/BorderImage" showInItemLibrary="true" category="Qt - Basic" icon=":/fxplugin/images/border-image-icon.png">
<node name="Qt/BorderImage" showInItemLibrary="true" category="Qt - Basic" icon=":/fxplugin/images/border-image-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="200"/>
<propertyDefaultValue name="height" type="int" defaultValue="200"/>
<itemlibraryrepresentation name="Border Image" icon=":/fxplugin/images/border-image-icon.png">
......@@ -66,7 +66,7 @@
<property name="source" type="QUrl" value="qrc:/fxplugin/images/template_image.png"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Flickable" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/flickable-icon.png">
<node name="Qt/Flickable" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/flickable-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="300"/>
<propertyDefaultValue name="height" type="int" defaultValue="300"/>
<itemlibraryrepresentation name="Flickable" icon=":/fxplugin/images/flickable-icon.png">
......@@ -74,7 +74,7 @@
<property name="height" type="int" value="300"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Flipable" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/flipable-icon.png">
<node name="Qt/Flipable" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/flipable-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="300"/>
<propertyDefaultValue name="height" type="int" defaultValue="300"/>
<itemlibraryrepresentation name="Flipable" icon=":/fxplugin/images/flipable-icon.png">
......@@ -82,28 +82,28 @@
<property name="height" type="int" value="300"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/GridView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/gridview-icon.png">
<node name="Qt/GridView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/gridview-icon16.png">
<itemlibraryrepresentation name="Grid View" icon=":/fxplugin/images/gridview-icon.png">
<property name="width" type="int" value="300"/>
<property name="height" type="int" value="300"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/ListView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/listview-icon.png">
<node name="Qt/ListView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/listview-icon16.png">
<itemlibraryrepresentation name="List View" icon=":/fxplugin/images/listview-icon.png">
<property name="width" type="int" value="300"/>
<property name="height" type="int" value="300"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/PathView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/pathview-icon.png">
<node name="Qt/PathView" showInItemLibrary="true" category="Qt - Views" icon=":/fxplugin/images/pathview-icon16.png">
<itemlibraryrepresentation name="Path View" icon=":/fxplugin/images/pathview-icon.png">
<property name="width" type="int" value="300"/>
<property name="height" type="int" value="300"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/FocusScope" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/focusscope-icon.png">
<node name="Qt/FocusScope" showInItemLibrary="true" category="Qt - Interaction" icon=":/fxplugin/images/focusscope-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="100"/>
<propertyDefaultValue name="height" type="int" defaultValue="100"/>
<itemlibraryrepresentation name="Focus Scope" icon=":/fxplugin/images/focusscope-icon.png">
......@@ -112,36 +112,7 @@
</itemlibraryrepresentation>
</node>
<!--
<node name="Qt/Row" showInItemLibrary="true" category="Qt - Positioners" isContainer="true" icon=":/fxplugin/images/row-icon.png">
<propertyDefaultValue name="width" type="int" defaultValue="100"/>
<propertyDefaultValue name="height" type="int" defaultValue="100"/>
<itemlibraryrepresentation name="Row" icon=":/fxplugin/images/row-icon.png">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="100"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Column" showInItemLibrary="true" category="Qt - Positioners" isContainer="true" icon=":/fxplugin/images/column-icon.png">
<propertyDefaultValue name="width" type="int" defaultValue="100"/>
<propertyDefaultValue name="height" type="int" defaultValue="100"/>
<itemlibraryrepresentation name="Column" icon=":/fxplugin/images/column-icon.png">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="100"/>
</itemlibraryrepresentation>
</node>
<node name="Qt/Grid" showInItemLibrary="true" category="Qt - Positioners" isContainer="true" icon=":/fxplugin/images/grid-icon.png">
<propertyDefaultValue name="width" type="int" defaultValue="100"/>
<propertyDefaultValue name="height" type="int" defaultValue="100"/>
<itemlibraryrepresentation name="Grid" icon=":/fxplugin/images/grid-icon.png">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="100"/>
</itemlibraryrepresentation>
</node>
-->
<node name="Qt/WebView" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/webview-icon.png">
<node name="Qt/WebView" showInItemLibrary="true" category="Qt - Widgets" icon=":/fxplugin/images/webview-icon16.png">
<propertyDefaultValue name="width" type="int" defaultValue="300"/>
<propertyDefaultValue name="height" type="int" defaultValue="300"/>
<itemlibraryrepresentation name="Web View" icon=":/fxplugin/images/webview-icon.png">
......
......@@ -17,5 +17,20 @@
<file>images/pathview-icon.png</file>
<file>images/focusscope-icon.png</file>
<file>images/webview-icon.png</file>
<file>images/text-icon16.png</file>
<file>images/border-image-icon16.png</file>
<file>images/flickable-icon16.png</file>
<file>images/focusscope-icon16.png</file>
<file>images/item-icon16.png</file>
<file>images/image-icon16.png</file>
<file>images/gridview-icon16.png</file>
<file>images/listview-icon16.png</file>
<file>images/flipable-icon16.png</file>
<file>images/mouse-area-icon16.png</file>
<file>images/pathview-icon16.png</file>
<file>images/rect-icon16.png</file>
<file>images/text-edit-icon16.png</file>
<file>images/text-input-icon16.png</file>
<file>images/webview-icon16.png</file>
</qresource>
</RCC>
Supports Markdown
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