[LyX/master] Properly resize columns of child document table widget
Jürgen Spitzmüller
spitz at lyx.org
Fri Feb 7 16:25:05 UTC 2020
Am Freitag, den 07.02.2020, 17:05 +0100 schrieb Juergen Spitzmueller:
> commit b8546139c8ebc2432b9a3d42372f4b2bf893454d
> Author: Juergen Spitzmueller <spitz at lyx.org>
> Date: Fri Feb 7 17:23:14 2020 +0100
>
> Properly resize columns of child document table widget
Riki, this is candidate for stable.
Jürgen
> ---
> src/frontends/qt/GuiDocument.cpp | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/src/frontends/qt/GuiDocument.cpp
> b/src/frontends/qt/GuiDocument.cpp
> index d08a648..ac4b1f1 100644
> --- a/src/frontends/qt/GuiDocument.cpp
> +++ b/src/frontends/qt/GuiDocument.cpp
> @@ -893,9 +893,13 @@ GuiDocument::GuiDocument(GuiView & lv)
> masterChildModule->childrenTW->setColumnCount(2);
> masterChildModule->childrenTW->headerItem()->setText(0,
> qt_("Child Document"));
> masterChildModule->childrenTW->headerItem()->setText(1,
> qt_("Include to Output"));
> - masterChildModule->childrenTW->resizeColumnToContents(1);
> - masterChildModule->childrenTW->resizeColumnToContents(2);
> -
> +#if (QT_VERSION > 0x050000)
> + masterChildModule->childrenTW->header()-
> >setSectionResizeMode(0, QHeaderView::ResizeToContents);
> + masterChildModule->childrenTW->header()-
> >setSectionResizeMode(1, QHeaderView::ResizeToContents);
> +#else
> + masterChildModule->childrenTW->header()->setResizeMode(0,
> QHeaderView::ResizeToContents);
> + masterChildModule->childrenTW->header()->setResizeMode(1,
> QHeaderView::ResizeToContents);
> +#endif
>
> // Formats
> outputModule = new UiWidget<Ui::OutputUi>(this);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200207/fb3eb026/attachment.asc>
More information about the lyx-devel
mailing list