diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-13 16:44:16 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-13 16:44:16 +0200 |
| commit | 1ab12862fd47bf3816f7fad7b8a96eceb8f84272 (patch) | |
| tree | a170aaca6adde67b931b3899ffaadb6e788c12c8 /tests/test_mimeparser.cpp | |
| parent | 1dd39414fd6139f2934554fc90b1c5721603d14b (diff) | |
| download | qtmaildir-1ab12862fd47bf3816f7fad7b8a96eceb8f84272.tar.gz qtmaildir-1ab12862fd47bf3816f7fad7b8a96eceb8f84272.zip | |
fix(rules): a long rule no longer squeezes the rule list away
Item 80. A rule with eight From conditions left the list showing about
one and a half rows.
The list was added with stretch 1 and the form below it with none, which
looks decisive and is not: a stretch factor only distributes space above
each widget's minimum, and the form's minimum grew with every condition
row, so each row came straight out of the list. The builder asked for
120px with one row and 414px with eight.
A QSplitter now divides the list from the editor, so the balance is the
user's and is saved beside the column widths, and the condition rows sit
in a QScrollArea capped at 190px so the editor cannot grow without bound
however the splitter is set. The scroll area is what text mode hides;
hiding the builder inside it would leave an empty frame.
Three measures were tried in the test before one told the bug and the
fix apart, and two passed against broken code: the dialog's
minimumSizeHint does not track form rows and read 580 either way, and a
qMin against the scroll area's own hint read small whether or not the
cap was set, since an uncapped maximumHeight is QWIDGETSIZE_MAX. What
survives mutation is the editor pane's minimum inside the splitter, plus
the cap read directly, and both are asserted. A row's size hint is
invalid until the event loop runs, so the test calls processEvents after
selecting a rule or it measures the same height twice.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_mimeparser.cpp')
0 files changed, 0 insertions, 0 deletions
