Summary: | Context View Video applet: Wrong applet size | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Christian (Fuchs) <kde> |
Component: | Context View/Video | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | deveaux.ludovic31, eqisow, hormiere.guillaume, jclavel, leonardo.la.malfa, lfranchi, paulo.miguel.dias, saniokh, simon.esneault, virgolus |
Priority: | NOR | ||
Version: | 2.3.1-GIT | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.3.2 | |
Sentry Crash Report: | |||
Attachments: | Labels applet |
Description
Christian (Fuchs)
2010-08-08 22:49:42 UTC
Created attachment 50784 [details] Labels applet I landed here after searching the archive, and reading Bug 245342. Basically, I experience the same issue regarding the Videoclip applet. But at my end, it seems to affect also the Labels applet, which appears way bigger than the others (please, see snapshot attached), and doesn't resize when I change the width of the Context View, or maximise/unmaximise the main window. I'm running Amarok 2.3.1.90 on Kubuntu 10.04 and KDE 4.5. I can't confirm it is present on the latest git build, though. Leonardo, please report your findings about the Labels applet against that component, else this is impossible to trace. Oops, I didn't notice that, sorry! Anyway, after a couple of crashes from yesterday, it seems today all applets (but video) are behaving properly. If anything changes, I'll report it against the proper component. Thank you! *** Bug 244165 has been marked as a duplicate of this bug. *** *** Bug 214156 has been marked as a duplicate of this bug. *** *** Bug 247157 has been marked as a duplicate of this bug. *** commit 7155b36a89d6f8e232b371732f6144f65859a71a Author: Mark Kretschmann <kretschmann@kde.org> Date: Sun Sep 12 15:11:59 2010 +0200 Fix incorrect size of VideoClip applet. BUG: 247097 diff --git a/ChangeLog b/ChangeLog index 2acb016..73b3334 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ VERSION 2.3.2 * Use system date/time format for default name when saving user playlists. BUGFIXES: + * Fixed incorrect size of the VideoClip applet. (BR 247097) * Comments embedded in files that contained newlines or tabs could be skipped entirely. (BR 223502) * The equalizer dialog did not discard changes when clicking "Cancel". diff --git a/src/context/applets/videoclip/VideoclipApplet.cpp b/src/context/applets/videoclip/VideoclipApplet.cpp index 6e28436..9ae305d 100644 --- a/src/context/applets/videoclip/VideoclipApplet.cpp +++ b/src/context/applets/videoclip/VideoclipApplet.cpp @@ -147,9 +147,6 @@ VideoclipApplet::init() //Update the applet (render properly the header) update(); - // we connect the geometry changed wit(h a setGeom function which will update the video widget geometry - connect ( this, SIGNAL(geometryChanged()), SLOT( setGeom() ) ); - connectSource( "videoclip" ); connect( dataEngine( "amarok-videoclip" ), SIGNAL( sourceAdded( const QString & ) ), @@ -296,32 +293,23 @@ VideoclipApplet::paintInterface( QPainter *p, const QStyleOptionGraphicsItem *op // draw rounded rect around title drawRoundedRectAroundText( p, m_headerText ); - if( m_widget->isVisible() ) - { - p->save(); - - const int frameWidth = m_scroll->frameWidth(); - const QScrollBar *scrollBar = m_scroll->horizontalScrollBar(); - const qreal scrollBarHeight = scrollBar->isVisible() ? scrollBar->height() + 2 : 0; - const QSizeF proxySize = m_widget->size(); - const QSizeF widgetSize( proxySize.width() - frameWidth * 2, - proxySize.height() - frameWidth * 2 - scrollBarHeight ); - const QPointF widgetPos( m_widget->pos().x() + frameWidth, - m_widget->pos().y() + frameWidth ); - const QRectF widgetRect( widgetPos, widgetSize ); - - QPainterPath path; - path.addRoundedRect( widgetRect, 2, 2 ); - p->fillPath( path, The::paletteHandler()->backgroundColor() ); - - p->restore(); - } -} + p->save(); -void -VideoclipApplet::setGeom( ) -{ - updateConstraints(); + const int frameWidth = m_scroll->frameWidth(); + const QScrollBar *scrollBar = m_scroll->horizontalScrollBar(); + const qreal scrollBarHeight = scrollBar->isVisible() ? scrollBar->height() + 2 : 0; + const QSizeF proxySize = m_widget->size(); + const QSizeF widgetSize( proxySize.width() - frameWidth * 2, + proxySize.height() - frameWidth * 2 - scrollBarHeight ); + const QPointF widgetPos( m_widget->pos().x() + frameWidth, + m_widget->pos().y() + frameWidth ); + const QRectF widgetRect( widgetPos, widgetSize ); + + QPainterPath path; + path.addRoundedRect( widgetRect, 2, 2 ); + p->fillPath( path, The::paletteHandler()->backgroundColor() ); + + p->restore(); } void @@ -374,8 +362,6 @@ VideoclipApplet::dataUpdated( const QString& name, const Plasma::DataEngine::Dat } else if ( data.contains( "item:0" ) ) { - // make the animation didn't stop because it was the mees - resize( size().width(), m_height ); m_headerText->setText( i18n( "Video Clip" ) ); update(); // set collapsed diff --git a/src/context/applets/videoclip/VideoclipApplet.h b/src/context/applets/videoclip/VideoclipApplet.h index 05c33a7..f863044 100644 --- a/src/context/applets/videoclip/VideoclipApplet.h +++ b/src/context/applets/videoclip/VideoclipApplet.h @@ -82,9 +82,8 @@ class VideoclipApplet : public Context::Applet, public Engine::EngineObserver virtual void engineNewTrackPlaying(); virtual void engineStateChanged(Phonon::State, Phonon::State ); virtual void enginePlaybackEnded( qint64 finalPosition, qint64 trackLength, PlaybackEndedReason reason ); - + public slots: - void setGeom(); void dataUpdated( const QString& name, const Plasma::DataEngine::Data& data ); void connectSource( const QString &source ); |