Kaydet (Commit) 930582f5 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst bf3f3668
......@@ -101,6 +101,7 @@ private:
SfxItemSet& m_rXFillSet;
// Background Bitmap ----------------------------------
VclContainer* m_pBitmapContainer;
VclContainer* m_pFileFrame;
PushButton* m_pBtnBrowse;
CheckBox* m_pBtnLink;
......
......@@ -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()
......
......@@ -1102,9 +1102,13 @@ GradientLB::GradientLB( Window* pParent, WinBits nWinStyle, sal_Bool bUserDraw /
EnableUserDraw( mbUserDraw);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeGradientLB(Window *pParent, VclBuilder::stringmap &)
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeGradientLB(Window *pParent, VclBuilder::stringmap &rMap)
{
GradientLB *pListBox = new GradientLB(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE);
WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
GradientLB *pListBox = new GradientLB(pParent, nWinStyle);
pListBox->EnableAutoSize(true);
return pListBox;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment