diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-24 12:55:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-24 12:56:51 +0100 |
commit | 319a9ce794126622cbd5061af40a6abeeed4ddb4 (patch) | |
tree | 9c919409f194f35ea714222d1fd7f2fb338d6f13 /cui/source | |
parent | ad0c6359dc044c659160a6a51c1647607c58979a (diff) |
pretty up area .ui conversion a bit
somewhere there is a single tab dialog that reuses this tabpage
so add some tweakery to ensure that the requested size is always
sufficient to hold largest combination of visible areas
Change-Id: If68de29057de7d3a5a26d753e11208e92ce40021
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 6a33660d4dbd..a24947f76482 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -648,6 +648,21 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : get(m_pCtlXRectPreview,"CTL_COLOR_PREVIEW"); + //so that even for "none" the size requested is the largest + //size required for any of the areas which might be selected + //later, so that there's sufficient space + VclContainer *pMainFrame = get<VclContainer>("mainframe"); + Size aIncrementsSize(m_pFlStepCount->get_preferred_size()); + Size aHatchSize(m_pFlHatchBckgrd->get_preferred_size()); + Size aBitmapSize(m_pBxBitmap->get_preferred_size()); + Size aMainFrame( + std::max(std::max(aIncrementsSize.Width(), aHatchSize.Width()), aBitmapSize.Width()), + std::max(std::max(aIncrementsSize.Height(), aHatchSize.Height()), aBitmapSize.Height())); + pMainFrame->set_width_request(aMainFrame.Width()); + pMainFrame->set_height_request(aMainFrame.Height()); + + + // groups that overlay each other m_pLbBitmap->Hide(); m_pCtlBitmapPreview->Hide(); @@ -2259,13 +2274,13 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ClickScaleHdl_Impl) if( m_pTsbScale->GetState() == STATE_CHECK ) { m_pMtrFldXSize->SetDecimalDigits( 0 ); - m_pMtrFldXSize->SetUnit( FUNIT_CUSTOM ); + m_pMtrFldXSize->SetUnit(FUNIT_PERCENT); m_pMtrFldXSize->SetValue( 100 ); m_pMtrFldXSize->SetMax( 100 ); m_pMtrFldXSize->SetLast( 100 ); m_pMtrFldYSize->SetDecimalDigits( 0 ); - m_pMtrFldYSize->SetUnit( FUNIT_CUSTOM ); + m_pMtrFldYSize->SetUnit(FUNIT_PERCENT); m_pMtrFldYSize->SetValue( 100 ); m_pMtrFldYSize->SetMax( 100 ); m_pMtrFldYSize->SetLast( 100 ); |