diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-08 09:07:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-08 09:07:30 +0100 |
commit | 1a89eaeabd31dddfbad037e8109431a924632543 (patch) | |
tree | d3a8d07d07ffd9dd207f622212a37b8b401afad9 | |
parent | 786f0eae0673bc18a6e2a71323c70af671e46e66 (diff) |
if there is no secondary text then keep primary text orig font size
Change-Id: I12a70c3b3d12d6986a45a5f5c38affd2cd343bfe
-rw-r--r-- | vcl/source/window/layout.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index bdae0fcd3ec5..0c03839f5fa5 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1845,11 +1845,16 @@ short MessageDialog::Execute() WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_WORDBREAK | WB_NOLABEL | WB_NOTABSTOP; + bool bHasSecondaryText = !m_sSecondaryString.isEmpty(); + m_pPrimaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle); m_pPrimaryMessage->SetPaintTransparent(true); m_pPrimaryMessage->EnableCursor(false); Font aFont = GetSettings().GetStyleSettings().GetLabelFont(); - aFont.SetSize( Size( 0, aFont.GetSize().Height() * 1.2 ) ); + + if (bHasSecondaryText) + aFont.SetSize(Size(0, aFont.GetSize().Height() * 1.2)); + aFont.SetWeight(WEIGHT_BOLD); m_pPrimaryMessage->SetControlFont(aFont); m_pPrimaryMessage->set_grid_left_attach(1); @@ -1866,7 +1871,7 @@ short MessageDialog::Execute() m_pSecondaryMessage->set_grid_top_attach(1); m_pSecondaryMessage->set_hexpand(true); m_pSecondaryMessage->SetText(m_sSecondaryString); - m_pSecondaryMessage->Show(!m_sSecondaryString.isEmpty()); + m_pSecondaryMessage->Show(bHasSecondaryText); m_pSecondaryMessage->SetMaxTextWidth(m_pSecondaryMessage->approximate_char_width() * 80); VclButtonBox *pButtonBox = get_action_area(); |