diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-05-31 21:16:30 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-06-04 11:15:21 +0400 |
commit | 0d663b02dc04f06170afdac578fc4f7629be78a0 (patch) | |
tree | 75020e800bef9dcb145b63b79e600e65d2dfd8fb /cui | |
parent | c3b12e24ce5e62e05d524a338e1c17f8e7a53f53 (diff) |
remove the border from the options dialog, use just a separator instead
Change-Id: Ie1ca686a6bc7aea223837ab4c1ec0dad82b43073
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/treeopt.hxx | 4 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 28 | ||||
-rw-r--r-- | cui/source/options/treeopt.hrc | 11 | ||||
-rw-r--r-- | cui/source/options/treeopt.src | 19 |
4 files changed, 27 insertions, 35 deletions
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index aa3af77ab09a..38700e684d24 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -27,7 +27,7 @@ ************************************************************************/ #include <tools/resary.hxx> -#include <vcl/fixbrd.hxx> +#include <vcl/fixed.hxx> class SfxModule; class SfxShell; @@ -155,7 +155,7 @@ private: HelpButton aHelpPB; PushButton aBackPB; - FixedBorder aHiddenGB; + FixedLine aSeparatorFL; SvTreeListBox aTreeLB; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index e225df345326..809943bc9620 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -501,7 +501,7 @@ struct OptionsGroupInfo aCancelPB ( this, CUI_RES( PB_CANCEL ) ),\ aHelpPB ( this, CUI_RES( PB_HELP ) ),\ aBackPB ( this, CUI_RES( PB_BACK ) ),\ - aHiddenGB ( this, CUI_RES( FB_BORDER ) ),\ + aSeparatorFL ( this, CUI_RES( FL_SEPARATOR ) ),\ aTreeLB ( this, CUI_RES( TLB_PAGES ) ),\ sTitle ( GetText() ),\ sNotLoadedError ( CUI_RES( ST_LOAD_ERROR ) ),\ @@ -785,8 +785,6 @@ void OfaTreeOptionsDialog::InitTreeAndHandler() aTreeLB.SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) ); aBackPB.SetClickHdl( LINK( this, OfaTreeOptionsDialog, BackHdl_Impl ) ); aOkPB.SetClickHdl( LINK( this, OfaTreeOptionsDialog, OKHdl_Impl ) ); - - aHiddenGB.Show(); } void OfaTreeOptionsDialog::ActivatePage( sal_uInt16 nResId ) @@ -1079,13 +1077,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pPageInfo->m_nPageId ) ); pPageInfo->m_pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) ); - Point aTreePos(aTreeLB.GetPosPixel()); - Size aTreeSize(aTreeLB.GetSizePixel()); - Point aGBPos(aHiddenGB.GetPosPixel()); - Size aPageSize(pPageInfo->m_pPage->GetSizePixel()); - Size aGBSize(aHiddenGB.GetSizePixel()); - Point aPagePos( aGBPos.X() + ( aGBSize.Width() - aPageSize.Width() ) / 2, - aGBPos.Y() + ( aGBSize.Height() - aPageSize.Height() ) / 2 ); + Point aPagePos( aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y()); pPageInfo->m_pPage->SetPosPixel( aPagePos ); if ( RID_SVXPAGE_COLOR == pPageInfo->m_nPageId ) { @@ -1111,12 +1103,12 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() pPageInfo->m_pExtPage = new ExtensionsTabPage( this, 0, pPageInfo->m_sPageURL, pPageInfo->m_sEventHdl, m_xContainerWinProvider ); - Size aSize = aHiddenGB.GetSizePixel(); - aSize.Width() = aSize.Width() - 4; - aSize.Height() = aSize.Height() - 4; - Point aPos = aHiddenGB.GetPosPixel(); - aPos.X() = aPos.X() + 2; - aPos.Y() = aPos.Y() + 2; + Size aSize; + aSize.Width() = aSeparatorFL.GetSizePixel().Width(); + aSize.Height() = aSeparatorFL.GetSizePixel().Height() - aTreeLB.GetPosPixel().Y(); + Point aPos; + aPos.X() = aSeparatorFL.GetPosPixel().X(); + aPos.Y() = aTreeLB.GetPosPixel().Y(); pPageInfo->m_pExtPage->SetPosSizePixel( aPos, aSize ); } @@ -1928,7 +1920,7 @@ namespace void OfaTreeOptionsDialog::ResizeTreeLB( void ) { - const long nMax = aHiddenGB.GetSizePixel().Width() * 42 / 100; + const long nMax = aSeparatorFL.GetSizePixel().Width() * 42 / 100; // don't ask where 42 comes from... but it looks / feels ok ;-) long nDelta = 50; // min. sal_uInt16 nDepth = 0; @@ -1971,7 +1963,7 @@ void OfaTreeOptionsDialog::ResizeTreeLB( void ) MoveControl( aCancelPB, nDelta ); MoveControl( aHelpPB, nDelta ); MoveControl( aBackPB, nDelta ); - MoveControl( aHiddenGB, nDelta ); + MoveControl( aSeparatorFL, nDelta ); } bool isNodeActive( OptionsNode* pNode, Module* pModule ) diff --git a/cui/source/options/treeopt.hrc b/cui/source/options/treeopt.hrc index fc4e55f74e7f..3be1d6a8cdfa 100644 --- a/cui/source/options/treeopt.hrc +++ b/cui/source/options/treeopt.hrc @@ -35,7 +35,7 @@ #define PB_BACK 4 #define TLB_PAGES 5 -#define FB_BORDER 19 +#define FL_SEPARATOR 19 #define FT_HINT 21 #define CB_DISABLE 22 @@ -57,8 +57,8 @@ // metrics -#define WIDTH_PAGEFRAME (TP_WIDTH + 3) -#define HEIGHT_PAGEFRAME (TP_HEIGHT + 6) +#define WIDTH_PAGEFRAME TP_WIDTH +#define HEIGHT_PAGEFRAME TP_HEIGHT #define COL_1 (RSC_SP_DLG_INNERBORDER_LEFT) #define COL_2 (COL_1+0) @@ -77,5 +77,6 @@ #define ROW_1 (RSC_SP_DLG_INNERBORDER_TOP) #define ROW_2 (ROW_1+HEIGHT_PAGEFRAME) #define ROW_3 (ROW_2+RSC_SP_CTRL_GROUP_Y) -#define ROW_4 (ROW_3+RSC_CD_PUSHBUTTON_HEIGHT) -#define ROW_5 (ROW_4+RSC_SP_DLG_INNERBORDER_BOTTOM) +#define ROW_4 (ROW_3+RSC_CD_FIXEDLINE_HEIGHT) +#define ROW_5 (ROW_4+RSC_CD_PUSHBUTTON_HEIGHT) +#define ROW_6 (ROW_5+RSC_SP_DLG_INNERBORDER_BOTTOM) diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src index 68dbe8930766..f05f978cadd9 100644 --- a/cui/source/options/treeopt.src +++ b/cui/source/options/treeopt.src @@ -39,32 +39,32 @@ ModalDialog RID_OFADLG_OPTIONS_TREE OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( COL_12 , ROW_5 ) ; + Size = MAP_APPFONT ( COL_12 , ROW_6 ) ; Text [ en-US ] = "Options"; OKButton PB_OK { - Pos = MAP_APPFONT ( COL_4, ROW_3 ) ; + Pos = MAP_APPFONT ( COL_4, ROW_4 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; DefButton = TRUE; }; CancelButton PB_CANCEL { - Pos = MAP_APPFONT ( COL_6, ROW_3 ) ; + Pos = MAP_APPFONT ( COL_6, ROW_4 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; }; HelpButton PB_HELP { - Pos = MAP_APPFONT ( COL_8, ROW_3 ) ; + Pos = MAP_APPFONT ( COL_8, ROW_4 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; }; PushButton PB_BACK { HelpID = "cui:PushButton:RID_OFADLG_OPTIONS_TREE:PB_BACK"; - Pos = MAP_APPFONT ( COL_10, ROW_3 ) ; + Pos = MAP_APPFONT ( COL_10, ROW_4 ) ; Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; TabStop = TRUE ; Text [ en-US ] = "~Revert" ; @@ -73,15 +73,14 @@ ModalDialog RID_OFADLG_OPTIONS_TREE Control TLB_PAGES { Pos = MAP_APPFONT ( COL_1, ROW_1 ) ; - Size = MAP_APPFONT ( (COL_2-COL_1), (ROW_4-ROW_1) ); + Size = MAP_APPFONT ( (COL_2-COL_1), (ROW_5-ROW_1) ); TabStop = TRUE ; Border = TRUE; }; - Control FB_BORDER + FixedLine FL_SEPARATOR { - Pos = MAP_APPFONT ( COL_3, ROW_1 ) ; - Size = MAP_APPFONT ( WIDTH_PAGEFRAME, HEIGHT_PAGEFRAME ) ; - Hide = TRUE; + Pos = MAP_APPFONT ( COL_3, ROW_3 ) ; + Size = MAP_APPFONT ( WIDTH_PAGEFRAME, ROW_4-ROW_3 ) ; }; String ST_LOAD_ERROR { |