In D10564#212376, @rkflx wrote:Headers like File Time: in Sidebar → Information → Meta Information sometimes are hardly readable. This happens either when starting Gwenview normally and switching to fullscreen, or when starting in fullscreen (gwenview -f) and switching to normal mode.
In D10564#216061, @huoni wrote:Been looking into this, and I can see the problem, but unsure of the best fix.
=== Problem ===
Those headings, like many places, have a custom palette set where the text alpha is modified. Therefore when the palette is changed (going to fullscreen and back), the palette isn't update.
Now, whenever the sidebar is toggled, AND when you switch between pages, these headings along with the rest of the content are cleared and recreated, fixing the issue.
So the issue is only present when the sidebar is open, and one switches to/from fullscreen.=== Solution ===
I think the simplest solution is to find a way to update the contents when switching to/from fullscreen. Since this update happens every time you switch to the Information tab anyway, I don't think this is a waste of resources. (Rather than separating out the palette code and building some 'update palette' methods/signals/slots.)But the issue with this solution is due to the structure of the code. Somehow we need to get from MainWindow::toggleFullScreen to InfoContextManagerItem::updateSideBarContent, which isn't simple, and would I believe require some mechanism similar to the selectionChanged signal.
On the other hand, we can simply call selectionChanged on mContextManager and achieve the result we want, but it's a bit hacky.So either:
- Build some generic mechanism for MainWindow to be able to manually update sidebar content
- Just pretend the selection was changed to achieve the same result
What do you think? Hopefully I'm making sense.