Bug 360481 - Message part widgets sometimes require a resize event in order to really show up with desired sizes
Summary: Message part widgets sometimes require a resize event in order to really show...
Status: RESOLVED FIXED
Alias: None
Product: trojita
Classification: Unmaintained
Component: Desktop GUI (show other bugs)
Version: git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-13 16:03 UTC by Jan Kundrát
Modified: 2016-03-18 10:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
signed-testcase-for-stretches.eml (7.71 KB, message/rfc822)
2016-03-13 16:03 UTC, Jan Kundrát
Details
initial rendering -- see that nothing is really shown (29.25 KB, image/png)
2016-03-13 16:04 UTC, Jan Kundrát
Details
After pressing the "show details", the view expands a bit (37.23 KB, image/png)
2016-03-13 16:04 UTC, Jan Kundrát
Details
After manually resizing the area which is for the whole MessageWidget's height (63.13 KB, image/png)
2016-03-13 16:06 UTC, Jan Kundrát
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát 2016-03-13 16:03:26 UTC
Created attachment 97866 [details]
signed-testcase-for-stretches.eml

I've been getting this for "quite long", but I suspect that it's been mostly on the gpg branch, but definitely prior to the massive change to MessageView [1]. Opening a certain message leads to a rendering where the enclosed widget has height() == 0px, as confirmed by GammaRay.

[1] https://gerrit.vesnicky.cesnet.cz/r/660
Comment 1 Jan Kundrát 2016-03-13 16:04:21 UTC
Created attachment 97867 [details]
initial rendering -- see that nothing is really shown
Comment 2 Jan Kundrát 2016-03-13 16:04:46 UTC
Created attachment 97868 [details]
After pressing the "show details", the view expands a bit
Comment 3 Jan Kundrát 2016-03-13 16:06:57 UTC
Created attachment 97869 [details]
After manually resizing the area which is for the whole MessageWidget's height

Also, I can select by mouse within the too-small part widget, and the text scrolls. This picture shows the end result of that after I forced it to redraw by resizing the MessageWidget's area.

Thomas, patches or suggestions are welcome :). Preferably on top of https://gerrit.vesnicky.cesnet.cz/r/660 .
Comment 4 Thomas Lübking 2016-03-18 10:45:18 UTC
Git commit f90a8ff7c25ea2825c3d2cb714ba6843058f2793 by Thomas Lübking.
Committed on 13/03/2016 at 22:52.
Pushed by gerrit into branch 'master'.

show widget after reparenting it

::addingOneWidget creates an unparented or foreign widget,
QLayout::addWidget() will implicitly reparent it
to the layouts parenting widget and reparenting widgets
implicitly hides them (don't ask - it's always been like that)

::adjustSize() simply skips hidden children and whatever finally shows
the widget does not activate the layout
Change-Id: Ia7f7af4efd2c631bb3a5a9c0ad7f8e67d426138f

M  +1    -0    src/Gui/PartWidget.cpp

http://commits.kde.org/trojita/f90a8ff7c25ea2825c3d2cb714ba6843058f2793