Bug 222260 - Lyrics applet has no scrollbar with long lyrics
Summary: Lyrics applet has no scrollbar with long lyrics
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Context View (show other bugs)
Version: 2.3-GIT
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 222281 223103 223203 223288 223604 224434 224482 225561 225667 226196 226747 227499 227953 229173 229353 230074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-11 18:57 UTC by Myriam Schweingruber
Modified: 2010-03-10 21:23 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of lyrics getting cut off. (242.53 KB, image/png)
2010-01-12 09:11 UTC, Joe Kowalski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myriam Schweingruber 2010-01-11 18:57:55 UTC
When the lyrics are longer than the available window, one should be able to scroll in it, but the scrollbar is missing.
Comment 1 Myriam Schweingruber 2010-01-12 00:51:08 UTC
*** Bug 222281 has been marked as a duplicate of this bug. ***
Comment 2 Leo Franchi 2010-01-12 06:44:53 UTC
the only person who hasn't been able to reproduce it so far has been using qt4.5. i'm on qt4.6...

if anyone else with qt4.6 could chime in if they also experience it, I would be grateful.
Comment 3 Joe Kowalski 2010-01-12 09:07:48 UTC
I'm seeing it here. Gentoo, qt-4.6.0, kde dev platform 4.4 rc1, amarok 2.2.2.
Comment 4 Joe Kowalski 2010-01-12 09:11:43 UTC
Created attachment 39808 [details]
Example of lyrics getting cut off.
Comment 5 Leo Franchi 2010-01-13 19:25:29 UTC
rick, this is a side effect of your commit 5358df6e1c0127f7785811aaf026b6d2ab4d1a6c .

my guess is since you messed with the setMin/Max size of the proxywidgets, it's not getting set correctly anymore. could you take a look?
Comment 6 Rick W. Chen 2010-01-14 03:55:58 UTC
I've been trying to reproduce this problem, unsuccessfully. A vertical scrollbar
always show up for long lyrics for me. The following were tested in all possible
combinations:

amarok v2.2.2
amarok git master (as of today)

kde 4.5.3

qt v4.5.3
qt v4.6.0
qt git 4.6 branch (v4.6.0-1905-g1cb8e4b)

The only thing not tested is kde 4.4rc1. Before I dig into the code, can someone
confirm if this bug also happens for kde 4.5.3?
Comment 7 Rick W. Chen 2010-01-14 10:24:27 UTC
commit 124fd2f4f97562f7ea7ed12c282a5f70ecdf4466
Author: Rick W. Chen <stuffcorpse@archlinux.us>
Date:   Thu Jan 14 22:13:10 2010 +1300

    Fix messed up scrollbar in lyrics applet under KDE 4.4
    
    BUG: 222260

diff --git a/ChangeLog b/ChangeLog
index 5897907..d7c6c79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@ VERSION 2.2.3
       files which incorrectly have the same MusicBrainz unique identifier.
 
   BUGFIXES:
+    * Lyrics applet: Fixed scrollbar incorrectly displayed (and sometimes not
+      at all) for long lyrics under KDE 4.4. (BR 222260)
     * Fixed bug in Photos applet that made it break with translated versions
       of Amarok. Patch by Bellegarde Cédric <gnumdk@gmail.com>. (BR 222566)
     * Lyrics applet: Fixed saving and restoring font styles. (BR 222277)
diff --git a/src/context/applets/lyrics/LyricsApplet.cpp b/src/context/applets/lyrics/LyricsApplet.cpp
index 0529b4c..18f9323 100644
--- a/src/context/applets/lyrics/LyricsApplet.cpp
+++ b/src/context/applets/lyrics/LyricsApplet.cpp
@@ -34,6 +34,7 @@
 #include <KTabWidget>
 
 #include <Plasma/IconWidget>
+#include <Plasma/Containment>
 
 #include <QAction>
 #include <QGraphicsProxyWidget>
@@ -542,7 +543,9 @@ void LyricsApplet::collapseToMin()
     // only show vertical scrollbar if there are lyrics and is needed
     browser->setVerticalScrollBarPolicy( m_hasLyrics ? Qt::ScrollBarAsNeeded : Qt::ScrollBarAlwaysOff );
 
-    setCollapseHeight( contentHeight );
+    const qreal containerHeight = containment()->size().height() - 1.0;
+    const qreal collapsedHeight = ( contentHeight > containerHeight ) ? containerHeight : contentHeight;
+    setCollapseHeight( collapsedHeight );
     setCollapseOn();
 }
Comment 8 Rick W. Chen 2010-01-14 10:49:33 UTC
Sorry, it's not completely fixed yet. Will fix soon.
Comment 9 Rick W. Chen 2010-01-14 16:02:42 UTC
Ok, should be fixed now in git. Please test.
Comment 10 Myriam Schweingruber 2010-01-15 01:09:34 UTC
Yes, works fine now :) Thanks for fixing!
Comment 11 Myriam Schweingruber 2010-01-17 13:44:10 UTC
*** Bug 223103 has been marked as a duplicate of this bug. ***
Comment 12 Rick W. Chen 2010-01-17 21:25:28 UTC
*** Bug 223203 has been marked as a duplicate of this bug. ***
Comment 13 Rick W. Chen 2010-01-18 15:47:59 UTC
*** Bug 223288 has been marked as a duplicate of this bug. ***
Comment 14 Alin M Elena 2010-01-19 22:32:47 UTC
navigation bar appears but is not long enough...
Comment 15 Myriam Schweingruber 2010-01-21 20:22:59 UTC
*** Bug 223604 has been marked as a duplicate of this bug. ***
Comment 16 Joe Kowalski 2010-01-25 08:46:45 UTC
Is is possible to make a patch for this that applies to 2.2.2. My git-fu failed miserably at trying to cherry pick this.
Comment 17 Myriam Schweingruber 2010-01-25 09:00:00 UTC
(In reply to comment #16)
> Is is possible to make a patch for this that applies to 2.2.2. My git-fu failed
> miserably at trying to cherry pick this.

You need to ask your distribution then, we don't issue patches between releases unless there is a security problem.
Comment 18 Myriam Schweingruber 2010-01-27 12:28:24 UTC
*** Bug 224434 has been marked as a duplicate of this bug. ***
Comment 19 Myriam Schweingruber 2010-01-27 22:34:05 UTC
*** Bug 224482 has been marked as a duplicate of this bug. ***
Comment 20 Rick W. Chen 2010-02-04 23:49:46 UTC
*** Bug 225561 has been marked as a duplicate of this bug. ***
Comment 21 Myriam Schweingruber 2010-02-06 13:15:46 UTC
*** Bug 225667 has been marked as a duplicate of this bug. ***
Comment 22 Myriam Schweingruber 2010-02-10 21:24:37 UTC
*** Bug 226196 has been marked as a duplicate of this bug. ***
Comment 23 Myriam Schweingruber 2010-02-14 01:07:49 UTC
*** Bug 226747 has been marked as a duplicate of this bug. ***
Comment 24 Myriam Schweingruber 2010-02-18 12:06:59 UTC
*** Bug 227499 has been marked as a duplicate of this bug. ***
Comment 25 Myriam Schweingruber 2010-02-21 18:35:38 UTC
*** Bug 227953 has been marked as a duplicate of this bug. ***
Comment 26 Myriam Schweingruber 2010-02-28 18:23:03 UTC
*** Bug 228922 has been marked as a duplicate of this bug. ***
Comment 27 Myriam Schweingruber 2010-03-03 10:02:59 UTC
*** Bug 229173 has been marked as a duplicate of this bug. ***
Comment 28 Myriam Schweingruber 2010-03-04 09:52:58 UTC
*** Bug 229353 has been marked as a duplicate of this bug. ***
Comment 29 Myriam Schweingruber 2010-03-10 21:23:39 UTC
*** Bug 230074 has been marked as a duplicate of this bug. ***