Use localized item when calculating the panel stack's tree widget width.

The current version was wrong for non-English dialogs, and even for
the English one, due to the translator commands that were not removed
for calculation (as in "Formats[[output]]").
This commit is contained in:
Juergen Spitzmueller 2017-02-05 18:02:34 +01:00
parent 8a0696db29
commit 39cee7396b
2 changed files with 4 additions and 1 deletions

View File

@ -121,7 +121,7 @@ void PanelStack::addCategory(QString const & name, QString const & parent)
QFontMetrics fm(list_->font()); QFontMetrics fm(list_->font());
// calculate the real size the current item needs in the listview // calculate the real size the current item needs in the listview
int itemsize = fm.width(name) + 10 + list_->indentation() * depth; int itemsize = fm.width(qt_(name)) + 10 + list_->indentation() * depth;
// adjust the listview width to the max. itemsize // adjust the listview width to the max. itemsize
if (itemsize > list_->minimumWidth()) if (itemsize > list_->minimumWidth())
list_->setMinimumWidth(itemsize); list_->setMinimumWidth(itemsize);

View File

@ -198,6 +198,9 @@ What's new
- Correctly enable/disable citation dialog widgets on initialization. - Correctly enable/disable citation dialog widgets on initialization.
- Correct width of the navigating window in the document settings and
preferences dialogs in non-English localizations.
* INTERNALS * INTERNALS