hugolabe / Wike

Wikipedia Reader for the GNOME Desktop
https://hugolabe.github.io/Wike/
GNU General Public License v3.0
252 stars 33 forks source link

decouple flap state from pin-sidebar action to restore pinned state after re-expanding window #118

Closed camelCaseNick closed 1 year ago

camelCaseNick commented 1 year ago

The pin-sidebar action's state, being user intend for a pinned sidebar, can and will be overruled for lack of space. Currently, this overruling is made permanent, so shrinking the window and re-expanding it will result in the previously pinned sidebar to not be pinned anymore.

With decoupling the flap state from the pin-sidebar action, this overruling is made temporary with the user's previous setting restored.

As a follow-up, the button to pin the sidebar is when disabled of no use, and could even confuse due to the button's state not reflecting the sidebar's state. To solve this confusion, the button can be hidden, when the sidebar is forced into the collapsed mode on smaller screens or window widths.

hugolabe commented 1 year ago

The idea is good, but the problem is that hiding the button breaks the design, leaving a blank space on the right.

This is due to the fact that the size of the buttons is fixed manually, since if I let them expand the sidebar becomes wider than desired when it is in floating mode. Hopefully I can change this in the future (maybe with some libadwaita update).

In the meantime, I prefer to leave it unchanged and study the subject more calmly.

camelCaseNick commented 1 year ago

The idea is good, but the problem is that hiding the button breaks the design, leaving a blank space on the right.

The button could make use of a revealer, but then the blank space is on the left