messagelist: fix horizontal scrollbar when applying column sizes

Authored by dfaure on May 5 2017, 10:13 PM.

Description

messagelist: fix horizontal scrollbar when applying column sizes

Summary:
On startup the column sizes were calculated for a viewport without
vertical scrollbar, and then not adjusted when the vertical scrollbar
later appears. My fix is to simply always recalculate column sizes
when the viewport is resized at any point. If I resize the mainwindow
I still don't want a horizontal scrollbar under the messagelist.

This removes the need for showEvent since any change of size triggers
resizeEvent anyway. I also can't see any use for recalculating the
sizes on model reset (e.g. switching folders), QHeaderView appears to
just keep the column sizes when doing that (might be my own QHeaderView
fix, actually).

Test Plan: starting kmail, switching folders, resizing columns...

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: dvratil, mkoller, KDE PIM

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D5724

Details

Committed
dfaureJun 23 2017, 8:50 AM
Reviewer
mlaurent
Differential Revision
D5724: messagelist: fix horizontal scrollbar when applying column sizes
Parents
R94:33d2a97f0255: GIT_SILENT: Prepare 5.5.3
Branches
Unknown
Tags
Unknown