From b4e4b365b38c1907156ad3d2980599d47edb04cc Mon Sep 17 00:00:00 2001 From: Thomas Frauendorfer Date: Thu, 15 May 2008 08:37:02 +0200 Subject: [PATCH] OTHER: Fixed playlist scrollbar The playlistscrollbar is now also visible if the playlist was open on program start. Also fixed grapics glitches in small numbers after Skin change Updated dependencies in README (because of API change in broadcastCurrentPos) --- README | 9 ++++----- src/Skin.cpp | 2 +- src/SmallNumberDisplay.cpp | 2 +- src/playlist/playlistwidget.cpp | 16 +++++++++++----- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README b/README index 4ac48ff..4632dc6 100644 --- a/README +++ b/README @@ -1,7 +1,10 @@ Required dependencys: * QT4.2.x http://www.trolltech.no/ * XMMS2 http://xmms2.xmms.org/ - * XMMS2 C++ bindings (make sure to have boost_signals when compiling xmms2) + * XMMS2 C++ bindings (make sure to have boost_signals when compiling xmms2) + - promoe should compile with DrK + - if you compile against xmms2-devel + make sure it isn't not older than 2008-05-15 Optional dependencys: * Avahi http://www.avahi.org/ @@ -27,10 +30,6 @@ Compilation problems: After installing the headerfiles run 'make distclean' and start again from 'Compiling 1)' - - If promoe doesn't compile because of some wrong reference in - lib/playlist.cpp you need to apply the fix for the c++ bindings from - xmms2-eclipser.git (Bug 1965) - Reporting Bugs: preferred way to report bugs is through xmms2's bugtracker at 'http://bugs.xmms2.xmms.se/' at project 'Client - Promoe' diff --git a/src/Skin.cpp b/src/Skin.cpp index a50767b..6edb5a7 100644 --- a/src/Skin.cpp +++ b/src/Skin.cpp @@ -361,7 +361,7 @@ Skin::BuildLetterMap (void) for (int i = 0; i < 3; i++) { QList(l); for (int j = 0; j < 31; j++) { - l.append(img->copy(j*5, i*6, 4, 6)); + l.append(img->copy(j*5, i*6, 5, 6)); } letters.append(l); } diff --git a/src/SmallNumberDisplay.cpp b/src/SmallNumberDisplay.cpp index 6552d1d..d6da37b 100644 --- a/src/SmallNumberDisplay.cpp +++ b/src/SmallNumberDisplay.cpp @@ -55,7 +55,7 @@ SmallNumberDisplay::drawNumber () m_pixmap.rect ()); for (int i = 0; i < m_num; i++) { - paint.drawPixmap (QRect (i*5, 0, 4, 6), + paint.drawPixmap (QRect (i*5, 0, 5, 6), skin->getLetter (m_nums[i]), skin->getLetter (m_nums[i]).rect ()); } diff --git a/src/playlist/playlistwidget.cpp b/src/playlist/playlistwidget.cpp index 3d96e86..357ce96 100644 --- a/src/playlist/playlistwidget.cpp +++ b/src/playlist/playlistwidget.cpp @@ -197,6 +197,7 @@ PlaylistWidget::PlaylistWidget (QWidget *parent) : QWidget (parent) m_scrollBar = new PlaylistScrollBar (this); m_view->setVerticalScrollBar (m_scrollBar); m_scrollBar->setParent(this); + m_scrollBar->setVisible (true); m_scrollBar->show(); /* Workarounds for another QT bug (at least in my opinion) */ connect (m_scrollBar, SIGNAL(actionTriggered (int)), @@ -378,11 +379,16 @@ PlaylistWidget::resizeEvent (QResizeEvent *event) { m_view->resize (size().width()-30, size().height()-20-38); - /* since the sizes has changed we need to move the buttons */ - m_scrollBar->move (size().width()-m_rfill3.width()-m_rfill2.width(), - m_corner2.height()); - m_scrollBar->resize (m_rfill2.width(), - size().height()-m_corner2.height()-m_corner4.height()); + /* since the sizes has changed we need to move the scrollbar */ +// m_scrollBar->move (size().width()-m_rfill3.width()-m_rfill2.width(), +// m_corner2.height()); +// m_scrollBar->resize (m_rfill2.width(), +// size().height()-m_corner2.height()-m_corner4.height()); + // Hardcoded values to avoid missing scrollBar if Playlist was visible + // on startup + m_scrollBar->move (size ().width ()-8-7, 20); + m_scrollBar->resize (8, size ().height ()-20-38); + /* place the sizegrip in the lower right corner */ m_sizegrip->move( size().width() - m_sizegrip->width(),