feat(geometrySpreadsheet): add icons
This commit is contained in:
@@ -30,7 +30,6 @@ GeoSheetModeButton::GeoSheetModeButton(QWidget* parent)
|
||||
// }
|
||||
// )");
|
||||
|
||||
setIcon(QIcon(":/node-icons/grid.svg"));
|
||||
}
|
||||
|
||||
void GeoSheetModeButton::enterEvent(QEnterEvent *event)
|
||||
@@ -68,8 +67,7 @@ void GeoSheetModeButton::paintEvent(QPaintEvent* event)
|
||||
|
||||
|
||||
QPixmap pixmap = buttonIcon.pixmap(size);
|
||||
QPoint center = event->rect().center() - QPoint(size.width() / 2, size.height() / 2);
|
||||
// QPoint center = QPoint(0,0);
|
||||
QPoint center = rect().center() - QPoint(size.width() / 2, size.height() / 2);
|
||||
painter.drawPixmap(center, pixmap);
|
||||
|
||||
}
|
||||
@@ -104,19 +102,20 @@ GeoSheetMenuBarModeSelection::GeoSheetMenuBarModeSelection(QWidget *parent, Qt::
|
||||
|
||||
modeButtonGroup_.setExclusive(true);
|
||||
|
||||
auto newButton = [this, &buttonBgLayout](const char* tooltip="")
|
||||
auto newButton = [this, &buttonBgLayout](const char* tooltip="", const char* iconPath=":/icons/attributePoint.svg")
|
||||
{
|
||||
auto newButton = new GeoSheetModeButton();
|
||||
newButton->setToolTip(tooltip);
|
||||
newButton->setIcon(QIcon(iconPath));
|
||||
modeButtonGroup_.addButton(newButton);
|
||||
buttonBgLayout->addWidget(newButton);
|
||||
return newButton;
|
||||
};
|
||||
|
||||
pointButton = newButton("Point Attributes");
|
||||
vertexButton = newButton("Vertex Attributes");
|
||||
primitiveButton = newButton("Primitive Attributes");
|
||||
globalButton = newButton("Global Attributes");
|
||||
pointButton = newButton("Point Attributes", ":/icons/attributePoint.svg");
|
||||
vertexButton = newButton("Vertex Attributes", ":/icons/attributeVertex.svg");
|
||||
primitiveButton = newButton("Primitive Attributes", ":/icons/attributePrimitive.svg");
|
||||
globalButton = newButton("Global Attributes", ":/icons/attributeGlobal.svg");
|
||||
|
||||
pointButton->setChecked(true);
|
||||
|
||||
|
||||
76
static/icons/attributeBase.svg
Normal file
76
static/icons/attributeBase.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 18 KiB |
76
static/icons/attributeGlobal.svg
Normal file
76
static/icons/attributeGlobal.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 18 KiB |
81
static/icons/attributePoint.svg
Normal file
81
static/icons/attributePoint.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 18 KiB |
76
static/icons/attributePrimitive.svg
Normal file
76
static/icons/attributePrimitive.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 18 KiB |
121
static/icons/attributeVertex.svg
Normal file
121
static/icons/attributeVertex.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 20 KiB |
@@ -1,5 +1,10 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>node-icons/grid.svg</file>
|
||||
<file>icons/attributePoint.svg</file>
|
||||
<file>icons/attributeVertex.svg</file>
|
||||
<file>icons/attributePrimitive.svg</file>
|
||||
<file>icons/attributeGlobal.svg</file>
|
||||
<file>icons/attributeBase.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user