<table><tr><td style="">kadabash added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16048">View Revision</a></tr></table><br /><div><div><p>You are right, of course. Magic constants are bad.</p>

<p>I could not, however, find a way to obtain the side bar width in order to calculate the correct sizeHint of the dialogue.<br />
The only way I could get it to work is by modifying the <tt style="background: #ebebeb; font-size: 13px;">KConfigDialog::KConfigDialogPrivate::addPageInternal()</tt> function in the KConfigWidgets library.</p>

<p>Would such a change even be considered to solve this minor issue?</p>

<p>In Dolphin, the solution also seems to have been a magic constant (see <a href="https://github.com/KDE/dolphin/blob/c69ecab9b70b988d9ee50f4e5480bf121fcc3057/src/settings/dolphinsettingsdialog.cpp#L44" class="remarkup-link" target="_blank" rel="noreferrer">the relevant line in dolphinsettingsdialog.cpp</a>).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16048">https://phabricator.kde.org/D16048</a></div></div><br /><div><strong>To: </strong>kadabash, aacid, Okular<br /><strong>Cc: </strong>ngraham, okular-devel, aacid<br /></div>