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

Resolves: fdo#85111 put a border around the custom properties box

Change-Id: Ibdbfb4a88c1c75aaf5d33672d8639a9ea55afbac
üst 6484bf5f
...@@ -465,9 +465,10 @@ public: ...@@ -465,9 +465,10 @@ public:
// class CustomPropertiesControl ----------------------------------------- // class CustomPropertiesControl -----------------------------------------
class CustomPropertiesControl : public VclVBox class CustomPropertiesControl : public vcl::Window
{ {
private: private:
VclVBox* m_pVBox;
HeaderBar* m_pHeaderBar; HeaderBar* m_pHeaderBar;
VclHBox* m_pBody; VclHBox* m_pBody;
CustomPropertiesWindow* m_pPropertiesWin; CustomPropertiesWindow* m_pPropertiesWin;
...@@ -490,7 +491,7 @@ public: ...@@ -490,7 +491,7 @@ public:
GetCustomProperties() const GetCustomProperties() const
{ return m_pPropertiesWin->GetCustomProperties(); } { return m_pPropertiesWin->GetCustomProperties(); }
void Init(VclBuilderContainer& rParent); void Init(VclBuilderContainer& rParent);
virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE;
}; };
// class SfxCustomPropertiesPage ----------------------------------------- // class SfxCustomPropertiesPage -----------------------------------------
......
...@@ -1985,7 +1985,8 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c ...@@ -1985,7 +1985,8 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c
} }
CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent) 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_pHeaderBar(NULL)
, m_pBody(NULL) , m_pBody(NULL)
, m_pPropertiesWin(NULL) , m_pPropertiesWin(NULL)
...@@ -1996,8 +1997,9 @@ CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent) ...@@ -1996,8 +1997,9 @@ CustomPropertiesControl::CustomPropertiesControl(vcl::Window* pParent)
void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder)
{ {
m_pHeaderBar = new HeaderBar(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER); m_pVBox = new VclVBox(this);
m_pBody = new VclHBox(this); m_pHeaderBar = new HeaderBar(m_pVBox, WB_BUTTONSTYLE | WB_BOTTOMBORDER);
m_pBody = new VclHBox(m_pVBox);
FixedText* pName = rBuilder.get<FixedText>("name"); FixedText* pName = rBuilder.get<FixedText>("name");
FixedText* pType = rBuilder.get<FixedText>("type"); FixedText* pType = rBuilder.get<FixedText>("type");
FixedText* pValue = rBuilder.get<FixedText>("value"); FixedText* pValue = rBuilder.get<FixedText>("value");
...@@ -2012,6 +2014,12 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) ...@@ -2012,6 +2014,12 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder)
set_expand(true); set_expand(true);
set_fill(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_hexpand(true);
m_pBody->set_vexpand(true); m_pBody->set_vexpand(true);
m_pBody->set_expand(true); m_pBody->set_expand(true);
...@@ -2048,9 +2056,14 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) ...@@ -2048,9 +2056,14 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder)
m_pVertScroll->SetScrollHdl( aScrollLink ); 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 ); bool bWidgetsResized = m_pPropertiesWin->InitControls( m_pHeaderBar, m_pVertScroll );
sal_Int32 nScrollOffset = m_pPropertiesWin->GetLineHeight(); sal_Int32 nScrollOffset = m_pPropertiesWin->GetLineHeight();
...@@ -2075,6 +2088,7 @@ CustomPropertiesControl::~CustomPropertiesControl() ...@@ -2075,6 +2088,7 @@ CustomPropertiesControl::~CustomPropertiesControl()
delete m_pPropertiesWin; delete m_pPropertiesWin;
delete m_pBody; delete m_pBody;
delete m_pHeaderBar; delete m_pHeaderBar;
delete m_pVBox;
} }
IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar )
......
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