]> git.lyx.org Git - features.git/commit
LyXToolBox: a QToolBox with minimum size management
authorGuillaume Munch <gm@lyx.org>
Tue, 22 Mar 2016 21:57:17 +0000 (21:57 +0000)
committerGuillaume Munch <gm@lyx.org>
Sun, 28 Aug 2016 00:43:46 +0000 (01:43 +0100)
commitc8381f787322656bb9ae82202a640ddd9aa2de0a
tree8d504769050a5cd3d020447212e560f358d33719
parent2da2f6c00c4ef9b88e769f18234c4d0400997ea1
LyXToolBox: a QToolBox with minimum size management

The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.

(cherry picked from commits 576cb5df77604b50175b2410ac006c5c5c110e2b
                            7e9d0a938bb02510304822f6bce4df3bcfe4bfc9
                            efbc297b955da58cef7bf2d63dfbc8b2942c671e)
src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/LyXToolBox.cpp [new file with mode: 0644]
src/frontends/qt4/LyXToolBox.h [new file with mode: 0644]
src/frontends/qt4/Makefile.am
src/frontends/qt4/ui/CitationUi.ui