diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2017-02-14 12:08:03 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-02-24 08:58:58 +0000 |
commit | 3422dfc1b61c15d7d3a6b0e1ee16c50457946cc0 (patch) | |
tree | f9859409ebf5efa62d1d360922fbc42d5857d47a /vcl/source/control/notebookbar.cxx | |
parent | c2a9e9abdc3df4a9e5bf5e3fc43a73d5847996ac (diff) |
Notebookbar: Better resize support
Change-Id: I0bb5a5600be60a68e53132f2c3c42f79c958b2b3
Reviewed-on: https://gerrit.libreoffice.org/34491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/source/control/notebookbar.cxx')
-rw-r--r-- | vcl/source/control/notebookbar.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index 6f4108d1e9e4..453236012c21 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -105,6 +105,21 @@ void NotebookBar::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, P VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight)); } +void NotebookBar::Resize() +{ + if(m_pUIBuilder && m_pUIBuilder->get_widget_root()) + { + vcl::Window* pWindow = m_pUIBuilder->get_widget_root()->GetChild(0); + if (pWindow) + { + Size aSize = pWindow->GetSizePixel(); + aSize.Width() = GetSizePixel().Width(); + pWindow->SetSizePixel(aSize); + } + } + Control::Resize(); +} + void NotebookBar::SetIconClickHdl(Link<NotebookBar*, void> aHdl) { if (m_pContextContainer) |