diff options
author | Arno <am@disconnect.de> | 2010-12-12 11:36:42 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-12-12 11:36:42 +0100 |
commit | ce8ea0df0dd34e516bfad507c4dfb3735ecdf82b (patch) | |
tree | 83491df938f694d394890077b8cea1dc2b748837 /hoverwindow.cpp | |
parent | f2a3027188423719fcde96dd5975646b7122e268 (diff) | |
download | SheMov-ce8ea0df0dd34e516bfad507c4dfb3735ecdf82b.tar.gz SheMov-ce8ea0df0dd34e516bfad507c4dfb3735ecdf82b.tar.bz2 SheMov-ce8ea0df0dd34e516bfad507c4dfb3735ecdf82b.zip |
Hover fix
When hovering over movies in local mode both the ToolTip and the hover
image was shown. Fixed by only showing the ToolTip when the movie is not
available, eg. archive mode. In any other case incorporate the ToolTip
info into the hover image.
Diffstat (limited to 'hoverwindow.cpp')
-rw-r--r-- | hoverwindow.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hoverwindow.cpp b/hoverwindow.cpp index 6ca6bce..9e09728 100644 --- a/hoverwindow.cpp +++ b/hoverwindow.cpp @@ -47,14 +47,16 @@ void HoverWindow::setContent(const QString &parent, const QStringList &children) mLabel->setText(curText); } -void HoverWindow::setPixmap(const QPixmap &pm){ +void HoverWindow::setPixmap(const QPixmap &pm, bool scale){ mAlignCenter = true; QPixmap curPm = pm; - if(curPm.height() > 500){ - curPm = curPm.scaledToHeight(500); - } - if(curPm.width() > 300){ - curPm = curPm.scaledToWidth(300); + if(scale){ + if(curPm.height() > 500){ + curPm = curPm.scaledToHeight(500); + } + if(curPm.width() > 300){ + curPm = curPm.scaledToWidth(300); + } } mLabel->setPixmap(curPm); setMaximumSize(curPm.width() + 10, curPm.height() + 10); |