aacid created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Bug #1: If you call show() or setVisible() after animatedHide() nothing would 
happen
  
  This is because animatedHide() does
        d->content->move(0, -d->content->height());
  so it's moving the contents outside the view. To fix that we what the Show 
event
  and if the height or the contents position are not the "correct" ones we set 
them.
  There's an exception for that which is when show comes from animatedShow() so 
we
  use a guard variable for that.
  
  Also added a test for this
  
  Bug #2: If you call animatedShow() while animation for animatedHide() was 
running things would break
  
  This is because animationShow() was did. If hideAnimmation running, stop it,
  then if visible and no animation running, asume we're done. The problem is 
that isVisible is not
  enough for "it's totally visible", now we also check for height and content 
pos to be the fully
  visible one before saying it's done and doing an early return.
  
  There was a test for this already, but the test wasn't good enough since it 
was only checking for
  visible and not for height and content position.
  
  Along with this i also improved the tests making the visible/not visible 
checks more thorough
  and replacing some busy waits with QTRY_VERIFY

TEST PLAN
  Tests pass
  Now in okular the message widgets show correctly after calling show() on them 
after the user pressed the [x]

REPOSITORY
  R236 KWidgetsAddons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D8964

AFFECTED FILES
  autotests/kmessagewidgetautotest.cpp
  autotests/kmessagewidgetautotest.h
  src/kmessagewidget.cpp

To: aacid
Cc: #frameworks

Reply via email to