From 930582f5bcb3dc2e9a05d5ec38cdc11f35b92cc3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 30 Apr 2013 15:56:24 +0100 Subject: rework background page to balance the preview and controls a) expand to fit the available space b) make the controls and the preview the same size c) reorganize the three options of color, gradient and bitmap to all put the preview in the same place and adjust so the preview is the same size in each case, i.e. switching between views gives the impression of a single shared preview element d) put a border around the gradient list so its area is visually noticable to be the same size as its preview area Change-Id: I88735778bb482f9dd011f890d170be127877367a --- cui/source/inc/backgrnd.hxx | 1 + cui/source/tabpages/backgrnd.cxx | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'cui/source') diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index b5967f7022a0..c3e13b9e176d 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -101,6 +101,7 @@ private: SfxItemSet& m_rXFillSet; // Background Bitmap ---------------------------------- + VclContainer* m_pBitmapContainer; VclContainer* m_pFileFrame; PushButton* m_pBtnBrowse; CheckBox* m_pBtnLink; diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 3cc1f4559c5b..3b94fdfc757d 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -378,6 +378,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, const SfxItemSet& rC m_pCtlPreview->set_width_request(aSize.Width()); m_pCtlPreview->set_height_request(aSize.Height()); + get(m_pBitmapContainer, "graphicgrid"); get(m_pFileFrame, "fileframe"); get(m_pBtnBrowse, "browse"); get(m_pBtnLink, "link"); @@ -1262,7 +1263,8 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() HideColorUI_Impl(); HideGradientUI_Impl(); - m_pBtnPreview->Show(); + + m_pBitmapContainer->Show(); m_pFileFrame->Show(); m_pBtnLink->Show(!bLinkOnly && ! nHtmlMode & HTMLMODE_ON); @@ -1270,6 +1272,7 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() m_pTypeFrame->Show(); m_pPreviewWin2->Show(); + m_pBtnPreview->Show(); m_pGraphTransFrame->Show(bGraphTransparency); m_pColTransFT->Show(sal_False); @@ -1279,15 +1282,12 @@ void SvxBackgroundTabPage::ShowBitmapUI_Impl() void SvxBackgroundTabPage::HideBitmapUI_Impl() { - m_pBtnPreview->Hide(); - - m_pFileFrame->Hide(); - - m_pTypeFrame->Hide(); - - m_pPreviewWin2->Hide(); - - m_pGraphTransFrame->Hide(); + m_pBitmapContainer->Hide(); + m_pFileFrame->Hide(); + m_pTypeFrame->Hide(); + m_pPreviewWin2->Hide(); + m_pBtnPreview->Hide(); + m_pGraphTransFrame->Hide(); } void SvxBackgroundTabPage::ShowGradientUI_Impl() -- cgit