Bug 223113 - Applet selector button placement and usability problems
Summary: Applet selector button placement and usability problems
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Context View (show other bugs)
Version: 2.2.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-17 12:12 UTC by David Nemeskey
Modified: 2010-05-04 04:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Nemeskey 2010-01-17 12:12:06 UTC
Version:           2.2.2 (using Devel)
OS:                Linux
Installed from:    Compiled sources

I have found two glitches in the applet selector:

1. When moving around the applet buttons, it is impossible to replace the first (leftmost) button by dragging another into its place. Luckily, the first button can be dragged away from its place. But even then, if I start dragging it, the second button immediately takes its place, and since it is now the first one, there is no way to cancel the drag operation, as I have no way of putting the button being dragged back to its place. Also if I have four applets and want to drag the last (rightmost) one to the left, I have to "rotate" the whole button list.

2. If I add the Current Track applet first, I cannot add another, as its X (remove) button is placed over the + (add applet) button. No other applets show this behavior, maybe because this one has the longest name.
Comment 1 Myriam Schweingruber 2010-01-17 13:45:53 UTC
Confirmed with latest Amarok 2.2.3-git.
Comment 2 Leo Franchi 2010-02-22 06:56:52 UTC
commit b9c9453cf3258ea9c88ef960f2d729173eb67758
Author: Leo Franchi <lfranchi@kde.org>
Date:   Mon Feb 22 00:22:34 2010 -0500

    fix off by one error left from porting from many-add-buttons to just one.
    
    CCBUG: 223113

diff --git a/src/context/toolbar/AppletItemOverlay.cpp b/src/context/toolbar/AppletItemOverlay.cpp
index 1ccd6d2..8da1512 100644
--- a/src/context/toolbar/AppletItemOverlay.cpp
+++ b/src/context/toolbar/AppletItemOverlay.cpp
@@ -292,7 +292,7 @@ Context::AppletItemOverlay::mouseMoveEvent( QMouseEvent *event )
 
     // swap items if we pass completely over the next/previous item or cross
     // more than halfway across it, whichever comes first
-    // debug() << m_prevGeom << g << m_nextGeom << addItemGeom;
+//     debug() << m_prevGeom << g << m_nextGeom << addItemGeom;
     if( m_prevGeom.isValid() && g.left() <= m_prevGeom.left() )
     {
         swapWithPrevious();
@@ -303,7 +303,7 @@ Context::AppletItemOverlay::mouseMoveEvent( QMouseEvent *event )
         swapWithNext();
     }
 
-    // debug() << "=================================";
+//     debug() << "=================================";
 }
 
 void 
@@ -444,7 +444,7 @@ Context::AppletItemOverlay::syncGeometry()
     setGeometry( m_applet->geometry().toRect() );
   //  debug() << "setting overlay geometry to" << m_applet->geometry().toRect();
 
-    if( m_index > 1 ) 
+    if( m_index > 0 ) 
     {
         if( m_layout->itemAt( m_index - 1 ) )
             m_prevGeom = m_layout->itemAt( m_index - 1 )->geometry();
Comment 3 Leo Franchi 2010-05-04 04:42:46 UTC
first part was fixed in old commit above, second part is no longer valid.