D11051: Remembering side navigation panel state

Albert Astals Cid noreply at phabricator.kde.org
Thu Apr 5 22:43:14 UTC 2018


aacid added a comment.


  In D11051#239497 <https://phabricator.kde.org/D11051#239497>, @dileepsankhla wrote:
  
  > The state can be saved whenever a sidebar item is clicked in Sidebar::itemClicked but again as discussed earlier, it will be asymmetrical as to save in sidebar.cpp. Should I implement a signal slot mechanism in part.cpp to achieve so or should I find another way?
  
  
  Ok, let's try to move the code to Sidebar again if you think there is better.
  
  Also would be very nice if you could add autotests for this (and the sidebar visibility feature that is a sister feature) to make sure it doesn't break.
  
  Basically,
  open part, show sidebar, close part, open part, check sidebar is visible, hide part, open part, check sidebar is not visible
  open part, show sidebar, collapse sidebar, close part, open part, check sidebar is visible but collapsed
  and the same variants also opening files, specially files with toc, since the also had the problem that was uncollapsing the sidebar when opening files for no reason.

INLINE COMMENTS

> part.cpp:439
> +    
> +    // Setting current item as thumbsBox if the side navigation panel is visible 
> +    if ( !Okular::Settings::hideSideContainer() )

can you please change your nomenclarute of "side navigation panel is visible" in this and the other comments, because that is what F7 does, which is sabed with m_sidebar->setSidebarVisibility and what you're saving is the collapsed status.

Also the config option would probably make more sense to be named something like sidebarCollapsed defaulting to false.

REPOSITORY
  R223 Okular

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

To: dileepsankhla, #okular, aacid
Cc: tobiasdeiminger, aacid, sander, #okular, michaelweghorn, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180405/3c2b57ff/attachment.html>


More information about the Okular-devel mailing list