From ce8ea0df0dd34e516bfad507c4dfb3735ecdf82b Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 12 Dec 2010 11:36:42 +0100 Subject: 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. --- hoverwindow.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'hoverwindow.cpp') 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); -- cgit v1.2.3-70-g09d2