patch to DWM system

This commit is contained in:
Rafael 2016-11-01 18:49:44 +01:00
parent cbc0274bb7
commit 70043be5f2
3 changed files with 5 additions and 5 deletions

View File

@ -109,16 +109,15 @@ void PictureDialog::addPreviousNextButtons()
backAction->setToolTip("");
nextAction->setToolTip("");
ui->jsonFrame->setStyleSheet(QString("QFrame { background: %1; }").arg(palette.window().color().name()));
stylize();
#endif
#endif
}
void PictureDialog::stylize()
void PictureDialog::stylizeDialog()
{
if (QtWin::isCompositionEnabled())
{
QtWin::extendFrameIntoClientArea(this, 0, this->layout()->menuBar()->height() - 2, 0, 0);
QtWin::extendFrameIntoClientArea(this, 0, this->layout()->menuBar()->height(), 0, 0);
setAttribute(Qt::WA_TranslucentBackground, true);
setAttribute(Qt::WA_NoSystemBackground, false);
setStyleSheet("PictureDialog { background: transparent; }");
@ -137,7 +136,7 @@ bool PictureDialog::event(QEvent *event)
#if QT_VERSION >= 0x050000
if (event->type() == QWinEvent::CompositionChange || event->type() == QWinEvent::ColorizationChange)
{
stylize();
stylizeDialog();
}
#endif
#endif

View File

@ -44,6 +44,7 @@ public:
void setSnapmaticPicture(SnapmaticPicture *picture, int index);
void setSnapmaticPicture(SnapmaticPicture *picture);
void addPreviousNextButtons();
void stylizeDialog();
bool isIndexed();
int getIndex();
~PictureDialog();
@ -63,7 +64,6 @@ private slots:
void exportCustomContextMenuRequestedPrivate(const QPoint &pos, bool fullscreen);
void nextPictureRequestedSlot();
void previousPictureRequestedSlot();
void stylize();
signals:
void nextPictureRequested();

View File

@ -115,6 +115,7 @@ void SnapmaticWidget::on_cmdView_clicked()
// show picture dialog
picDialog->show();
picDialog->stylizeDialog();
picDialog->setMinimumSize(picDialog->size());
picDialog->setMaximumSize(picDialog->size());
picDialog->exec();