diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-29 10:47:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-29 13:56:13 +0100 |
commit | c00a0a4fd1f84594e9ead9cad10b96fd7f4beade (patch) | |
tree | a831fed3cbfcf1b7063dd46a0ef5f8bba07a2f78 | |
parent | 900fccc29257d2e226dfcd0fc9ef54f1f5b52ec8 (diff) |
sfx2 classification: set toolbar listbox width after inserting entries
This way GetOptimalSize() returns a size that allows reading the
selected item after selecting one. (The new width is the double of the
old one, or so.)
Change-Id: I5f935dcbee52844fb325bd74437479f759a85852
-rw-r--r-- | sfx2/source/view/classificationcontroller.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index 8c6bd09b3eb1..85ae6586bd98 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -96,10 +96,7 @@ uno::Reference<awt::XWindow> ClassificationCategoriesController::createItemWindo vcl::Window* pParent = VCLUnoHelper::GetWindow(rParent); ToolBox* pToolbar = dynamic_cast<ToolBox*>(pParent); if (pToolbar) - { m_pCategories = VclPtr<ListBox>::Create(pToolbar, WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_DROPDOWN|WB_SIMPLEMODE); - m_pCategories->SetSizePixel(m_pCategories->GetOptimalSize()); - } return uno::Reference<awt::XWindow>(VCLUnoHelper::GetInterface(m_pCategories)); } @@ -119,6 +116,7 @@ void ClassificationCategoriesController::statusChanged(const frame::FeatureState m_pCategories->InsertEntry(rName); // Normally VclBuilder::makeObject() does this. m_pCategories->EnableAutoSize(true); + m_pCategories->SetSizePixel(m_pCategories->GetOptimalSize()); } } // namespace sfx2 |