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

Resolves: fdo#65930 line height needs to be calculated in ctor

we need to know that right from the start, not after the first
layout event after shown.

Change-Id: If7cc12cdf3e83913f0162fe34b376196162f6a45
üst b7f2129c
...@@ -1398,6 +1398,19 @@ CustomPropertiesWindow::CustomPropertiesWindow(Window* pParent, ...@@ -1398,6 +1398,19 @@ CustomPropertiesWindow::CustomPropertiesWindow(Window* pParent,
m_aNameBox.SetAccessibleName(rHeaderAccName); m_aNameBox.SetAccessibleName(rHeaderAccName);
m_aTypeBox.SetAccessibleName(rHeaderAccType); m_aTypeBox.SetAccessibleName(rHeaderAccType);
m_aValueEdit.SetAccessibleName(rHeaderAccValue); m_aValueEdit.SetAccessibleName(rHeaderAccValue);
m_aNameBox.Hide();
m_aTypeBox.Hide();
m_aValueEdit.Hide();
m_aDateField.Hide();
m_aTimeField.Hide();
m_aDurationField.Hide();
m_aEditButton.Hide();
m_aYesNoButton.Hide();
m_aRemoveButton.Hide();
m_nLineHeight =
( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height();
} }
CustomPropertiesWindow::~CustomPropertiesWindow() CustomPropertiesWindow::~CustomPropertiesWindow()
...@@ -1555,16 +1568,6 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa ...@@ -1555,16 +1568,6 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
DBG_ASSERT( pHeaderBar, "CustomPropertiesWindow::InitControls(): invalid headerbar" ); DBG_ASSERT( pHeaderBar, "CustomPropertiesWindow::InitControls(): invalid headerbar" );
DBG_ASSERT( pScrollBar, "CustomPropertiesWindow::InitControls(): invalid scrollbar" ); DBG_ASSERT( pScrollBar, "CustomPropertiesWindow::InitControls(): invalid scrollbar" );
m_aNameBox.Hide();
m_aTypeBox.Hide();
m_aValueEdit.Hide();
m_aDateField.Hide();
m_aTimeField.Hide();
m_aDurationField.Hide();
m_aEditButton.Hide();
m_aYesNoButton.Hide();
m_aRemoveButton.Hide();
const long nOffset = 4; const long nOffset = 4;
const long nScrollBarWidth = pScrollBar->GetSizePixel().Width(); const long nScrollBarWidth = pScrollBar->GetSizePixel().Width();
const long nButtonWidth = m_aRemoveButton.GetSizePixel().Width() + nScrollBarWidth + nOffset; const long nButtonWidth = m_aRemoveButton.GetSizePixel().Width() + nScrollBarWidth + nOffset;
...@@ -1614,9 +1617,6 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa ...@@ -1614,9 +1617,6 @@ void CustomPropertiesWindow::InitControls( HeaderBar* pHeaderBar, const ScrollBa
pCurrent++; pCurrent++;
} }
m_nLineHeight =
( m_aRemoveButton.GetPosPixel().Y() * 2 ) + m_aRemoveButton.GetSizePixel().Height();
} }
sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const sal_uInt16 CustomPropertiesWindow::GetVisibleLineCount() const
......
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