Add mini buttons for part list

master
Jeremy Hu 2018-04-07 20:30:26 +08:00
parent 65b14200a5
commit 8d558aa19f
2 changed files with 16 additions and 2 deletions

View File

@ -9,17 +9,29 @@ SkeletonPartWidget::SkeletonPartWidget(const SkeletonDocument *document, QUuid p
m_partId(partId) m_partId(partId)
{ {
m_visibleButton = new QPushButton(QChar(fa::eye)); m_visibleButton = new QPushButton(QChar(fa::eye));
m_visibleButton->setStyleSheet("QPushButton {border: none; background: none; color: #cccccc;}"); m_visibleButton->setStyleSheet("QPushButton {border: none; background: none; color: #252525;}");
m_visibleButton->setFont(Theme::awesome()->font(Theme::miniIconFontSize)); m_visibleButton->setFont(Theme::awesome()->font(Theme::miniIconFontSize));
m_visibleButton->setFixedSize(Theme::miniIconSize, Theme::miniIconSize); m_visibleButton->setFixedSize(Theme::miniIconSize, Theme::miniIconSize);
m_lockButton = new QPushButton(QChar(fa::unlock));
m_lockButton->setStyleSheet("QPushButton {border: none; background: none; color: #252525;}");
m_lockButton->setFont(Theme::awesome()->font(Theme::miniIconFontSize));
m_lockButton->setFixedSize(Theme::miniIconSize, Theme::miniIconSize);
m_subdivButton = new QPushButton(QChar(fa::cube));
m_subdivButton->setStyleSheet("QPushButton {border: none; background: none; color: #252525;}");
m_subdivButton->setFont(Theme::awesome()->font(Theme::miniIconFontSize));
m_subdivButton->setFixedSize(Theme::miniIconSize, Theme::miniIconSize);
m_previewLabel = new QLabel; m_previewLabel = new QLabel;
QHBoxLayout *miniToolLayout = new QHBoxLayout; QHBoxLayout *miniToolLayout = new QHBoxLayout;
miniToolLayout->setSpacing(0); miniToolLayout->setSpacing(0);
miniToolLayout->setContentsMargins(0, 0, 0, 0); miniToolLayout->setContentsMargins(0, 0, 0, 0);
miniToolLayout->addSpacing(3); miniToolLayout->addSpacing(5);
miniToolLayout->addWidget(m_visibleButton); miniToolLayout->addWidget(m_visibleButton);
miniToolLayout->addWidget(m_lockButton);
miniToolLayout->addWidget(m_subdivButton);
miniToolLayout->addStretch(); miniToolLayout->addStretch();
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = new QVBoxLayout;

View File

@ -18,6 +18,8 @@ private:
QUuid m_partId; QUuid m_partId;
QLabel *m_previewLabel; QLabel *m_previewLabel;
QPushButton *m_visibleButton; QPushButton *m_visibleButton;
QPushButton *m_lockButton;
QPushButton *m_subdivButton;
QLabel *m_nameLabel; QLabel *m_nameLabel;
}; };