summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-29 13:20:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-29 16:02:48 +0000
commitf0ffe0c063c8fe32758d77c83f773821ac185ba0 (patch)
tree086f441cbfc1196d6f98c6e742999de224141044 /sfx2/source
parent6484bf5f3f33a62670a29bf9a1f08bf62b64f145 (diff)
Resolves: fdo#85111 put a border around the custom properties box
Change-Id: Ibdbfb4a88c1c75aaf5d33672d8639a9ea55afbac
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx24
1 files changed, 19 insertions, 5 deletions
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 )