mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
win32 compile fix
svn path=/trunk/KDE/kdebase/apps/; revision=941223
This commit is contained in:
parent
d4f8439d91
commit
9a810d4df0
1 changed files with 9 additions and 1 deletions
|
@ -197,7 +197,11 @@ QRegion KToolTipDelegate::shapeMask(const KStyleOptionToolTip *option) const
|
||||||
|
|
||||||
bool KToolTipDelegate::haveAlphaChannel() const
|
bool KToolTipDelegate::haveAlphaChannel() const
|
||||||
{
|
{
|
||||||
|
#ifdef Q_WS_X11
|
||||||
return QX11Info::isCompositingManagerRunning();
|
return QX11Info::isCompositingManagerRunning();
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,9 +230,11 @@ private:
|
||||||
|
|
||||||
KTipLabel::KTipLabel() : QWidget(0, Qt::ToolTip)
|
KTipLabel::KTipLabel() : QWidget(0, Qt::ToolTip)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_WS_X11
|
||||||
if (QX11Info::isCompositingManagerRunning()) {
|
if (QX11Info::isCompositingManagerRunning()) {
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item)
|
void KTipLabel::showTip(const QPoint &pos, const KToolTipItem *item)
|
||||||
|
@ -254,11 +260,13 @@ void KTipLabel::paintEvent(QPaintEvent*)
|
||||||
KStyleOptionToolTip option = styleOption();
|
KStyleOptionToolTip option = styleOption();
|
||||||
option.rect = rect();
|
option.rect = rect();
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
if (QX11Info::isCompositingManagerRunning())
|
if (QX11Info::isCompositingManagerRunning())
|
||||||
XShapeCombineRegion(x11Info().display(), winId(), ShapeInput, 0, 0,
|
XShapeCombineRegion(x11Info().display(), winId(), ShapeInput, 0, 0,
|
||||||
delegate()->inputShape(&option).handle(), ShapeSet);
|
delegate()->inputShape(&option).handle(), ShapeSet);
|
||||||
else
|
else
|
||||||
setMask(delegate()->shapeMask(&option));
|
#endif
|
||||||
|
setMask(delegate()->shapeMask(&option));
|
||||||
|
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
p.setFont(option.font);
|
p.setFont(option.font);
|
||||||
|
|
Loading…
Reference in a new issue