Changeset 545591d1a9 in tspsg


Ignore:
Timestamp:
Sep 12, 2012, 7:15:25 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
0e473fbe88
Parents:
197f54a2b9
Message:

Made window background semi-transparent under X11.

Insted of fully transparent when translucency effects are enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/qtwin.cpp

    r197f54a2b9 r545591d1a9  
    148148#endif
    149149        widget->setAttribute(Qt::WA_TranslucentBackground, enable);
    150         widget->setAttribute(Qt::WA_NoSystemBackground, enable);
     150#ifdef Q_WS_X11
     151        widget->setAttribute(Qt::WA_NoSystemBackground, false);
     152        QPalette p = widget->palette();
     153        QColor c = p.color(QPalette::Window);
     154        if (enable)
     155            c.setAlpha(160);
     156        else
     157            c.setAlpha(255);
     158        p.setColor(QPalette::Window, c);
     159        widget->setPalette(p);
     160        result = true;
     161#endif
    151162#ifdef Q_OS_WIN32
    152163        hr = pDwmEnableBlurBehindWindow(HWND(widget->winId()), &bb);
Note: See TracChangeset for help on using the changeset viewer.