diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-29 13:20:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-29 16:02:48 +0000 |
commit | f0ffe0c063c8fe32758d77c83f773821ac185ba0 (patch) | |
tree | 086f441cbfc1196d6f98c6e742999de224141044 | |
parent | 6484bf5f3f33a62670a29bf9a1f08bf62b64f145 (diff) |
Resolves: fdo#85111 put a border around the custom properties box
Change-Id: Ibdbfb4a88c1c75aaf5d33672d8639a9ea55afbac
-rw-r--r-- | include/sfx2/dinfdlg.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 24 |
2 files changed, 22 insertions, 7 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index a70b5ee16f46..340681a2e37e 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -465,9 +465,10 @@ public: // class CustomPropertiesControl ----------------------------------------- -class CustomPropertiesControl : public VclVBox +class CustomPropertiesControl : public vcl::Window { private: + VclVBox* m_pVBox; HeaderBar* m_pHeaderBar; VclHBox* m_pBody; CustomPropertiesWindow* m_pPropertiesWin; @@ -490,7 +491,7 @@ public: GetCustomProperties() const { return m_pPropertiesWin->GetCustomProperties(); } void Init(VclBuilderContainer& rParent); - virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE; + virtual void Resize() SAL_OVERRIDE; }; // class SfxCustomPropertiesPage ----------------------------------------- diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index d6a2a6e9776c..b69a9d62f9d9 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1985,7 +1985,8 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c } CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent) - : VclVBox(pParent) + : Window(pParent, WB_HIDE | WB_CLIPCHILDREN | WB_TABSTOP | WB_DIALOGCONTROL | WB_BORDER) + , m_pVBox(NULL) , m_pHeaderBar(NULL) , m_pBody(NULL) , m_pPropertiesWin(NULL) @@ -1996,8 +1997,9 @@ CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent) void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) { - m_pHeaderBar = new HeaderBar(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER); - m_pBody = new VclHBox(this); + m_pVBox = new VclVBox(this); + m_pHeaderBar = new HeaderBar(m_pVBox, WB_BUTTONSTYLE | WB_BOTTOMBORDER); + m_pBody = new VclHBox(m_pVBox); FixedText* pName = rBuilder.get<FixedText>("name"); FixedText* pType = rBuilder.get<FixedText>("type"); FixedText* pValue = rBuilder.get<FixedText>("value"); @@ -2012,6 +2014,12 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) set_expand(true); set_fill(true); + m_pVBox->set_hexpand(true); + m_pVBox->set_vexpand(true); + m_pVBox->set_expand(true); + m_pVBox->set_fill(true); + m_pVBox->Show(); + m_pBody->set_hexpand(true); m_pBody->set_vexpand(true); m_pBody->set_expand(true); @@ -2048,9 +2056,14 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) m_pVertScroll->SetScrollHdl( aScrollLink ); } -void CustomPropertiesControl::setAllocation(const Size &rAllocation) +void CustomPropertiesControl::Resize() { - VclVBox::setAllocation(rAllocation); + Window::Resize(); + + if (!m_pVBox) + return; + + m_pVBox->SetSizePixel(GetSizePixel()); bool bWidgetsResized = m_pPropertiesWin->InitControls( m_pHeaderBar, m_pVertScroll ); sal_Int32 nScrollOffset = m_pPropertiesWin->GetLineHeight(); @@ -2075,6 +2088,7 @@ CustomPropertiesControl::~CustomPropertiesControl() delete m_pPropertiesWin; delete m_pBody; delete m_pHeaderBar; + delete m_pVBox; } IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) |