summaryrefslogtreecommitdiff
path: root/cui/source/options/treeopt.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-29 12:35:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-29 12:38:02 +0000
commit9a19ef1a041d708f64cc20364b99d929ed01c406 (patch)
tree8a9b058f320808f7a285b00c984baa41f95b98f1 /cui/source/options/treeopt.cxx
parentfdbb10a0e3f1e36cc28ea5547e08e6ad4b5de526 (diff)
make the options dialog layout incrementally convertable to .ui
it will now allocate the fixed reserved size for its tab pages to layout-enabled tabpages Change-Id: I5e56a09c5febc702d194f18954fd249bcd366dd9
Diffstat (limited to 'cui/source/options/treeopt.cxx')
-rw-r--r--cui/source/options/treeopt.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 5227729d81bf..aafbc6838369 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -913,6 +913,18 @@ long OfaTreeOptionsDialog::Notify( NotifyEvent& rNEvt )
}
// --------------------------------------------------------------------
+void OfaTreeOptionsDialog::SetPaneSize(Window *pPane)
+{
+ //The OfaTreeOptionsDialog is not fully widget layout enabled
+ //yet so it's a classic fixed dimension dialog, but to make
+ //it possible to incrementally convert it over each pane
+ //can be converted to .ui layout format and the fixed area
+ //size reserved for panes is allocated to them here
+ Point aPos(aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());
+ Size aSize(aSeparatorFL.GetSizePixel().Width(),
+ aSeparatorFL.GetPosPixel().Y() - aTreeLB.GetPosPixel().Y());
+ pPane->SetPosSizePixel( aPos, aSize );
+}
void OfaTreeOptionsDialog::SelectHdl_Impl()
{
@@ -1050,6 +1062,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
if(!pPageInfo->m_pPage && pGroupInfo->m_pModule)
pPageInfo->m_pPage = pGroupInfo->m_pModule->CreateTabPage(pPageInfo->m_nPageId, this, *pGroupInfo->m_pInItemSet);
+
}
DBG_ASSERT( pPageInfo->m_pPage, "tabpage could not created");
@@ -1069,6 +1082,8 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
{
pPageInfo->m_pPage->Reset( *pGroupInfo->m_pInItemSet );
}
+ if (pPageInfo->m_pPage->isLayoutEnabled())
+ SetPaneSize(pPageInfo->m_pPage);
}
}
else if ( 0 == pPageInfo->m_nPageId && !pPageInfo->m_pExtPage )
@@ -1085,10 +1100,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
pPageInfo->m_pExtPage = new ExtensionsTabPage(
this, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider );
- Point aPos(aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());
- Size aSize(aSeparatorFL.GetSizePixel().Width(),
- aSeparatorFL.GetPosPixel().Y() - aTreeLB.GetPosPixel().Y());
- pPageInfo->m_pExtPage->SetPosSizePixel( aPos, aSize );
+ SetPaneSize(pPageInfo->m_pExtPage);
}
if ( pPageInfo->m_pPage )