Add status bar

master
huxingyi 2020-12-12 16:53:21 +09:30
parent 9309afd587
commit 84cd377b52
2 changed files with 30 additions and 2 deletions

View File

@ -325,6 +325,13 @@ DocumentWindow::DocumentWindow() :
containerWidget->setLayout(containerLayout);
containerWidget->setMinimumSize(400, 400);
{
QPalette palette = containerWidget->palette();
palette.setColor(QPalette::Background, QColor(25, 25, 25));
containerWidget->setAutoFillBackground(true);
containerWidget->setPalette(palette);
}
m_graphicsContainerWidget = containerWidget;
//m_infoWidget = new QLabel(containerWidget);
@ -493,11 +500,32 @@ DocumentWindow::DocumentWindow() :
partsDocker->raise();
QWidget *titleBarWidget = new QWidget;
titleBarWidget->setFixedHeight(3);
QHBoxLayout *titleBarLayout = new QHBoxLayout;
titleBarLayout->addStretch();
titleBarWidget->setLayout(titleBarLayout);
QWidget *statusBarWidget = new QWidget;
statusBarWidget->setFixedHeight(30);
QHBoxLayout *statusBarLayout = new QHBoxLayout;
statusBarLayout->addStretch();
statusBarWidget->setLayout(statusBarLayout);
QVBoxLayout *canvasLayout = new QVBoxLayout;
canvasLayout->setSpacing(0);
canvasLayout->setContentsMargins(0, 0, 0, 0);
canvasLayout->addWidget(titleBarWidget);
canvasLayout->addWidget(containerWidget);
canvasLayout->addWidget(statusBarWidget);
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setSpacing(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->addLayout(mainLeftLayout);
mainLayout->addWidget(containerWidget);
mainLayout->addLayout(canvasLayout);
mainLayout->addSpacing(3);
QWidget *centralWidget = new QWidget;

View File

@ -724,7 +724,7 @@ void SkeletonGraphicsWidget::updateTurnaround()
const QImage *turnaroundImage = &m_document->turnaround;
QImage onePixel(2, 1, QImage::Format_ARGB32);
if (turnaroundImage->isNull()) {
onePixel.fill(Qt::transparent);
onePixel.fill(Qt::white);
turnaroundImage = &onePixel;
}