Adds function to generate context menu with available contents.

Refactors some auto-keywords to its real class names.
Paints drop location based on cursors drop area indicator.
Waits a few pixel before moving tab from SectionWidget.
This commit is contained in:
mfreiholz
2016-02-02 13:49:10 +01:00
parent 1336118e09
commit 19b5f57610
9 changed files with 117 additions and 59 deletions

View File

@@ -13,17 +13,21 @@ IconTitleWidget::IconTitleWidget(const QIcon& icon, const QString& title, QWidge
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
auto titleIcon = new QLabel();
// Icon label
if (icon.isNull())
{
titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
// auto titleIcon = new QLabel();
// titleIcon->setPixmap(style()->standardIcon(QStyle::SP_MessageBoxInformation).pixmap(16, 16));
// l->addWidget(titleIcon);
}
else
{
auto titleIcon = new QLabel();
titleIcon->setPixmap(icon.pixmap(16, 16));
l->addWidget(titleIcon);
}
l->addWidget(titleIcon);
// Title label
auto titleText = new QLabel(title);
auto titleFont = titleText->font();
titleFont.setBold(true);