diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-04-18 13:54:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-04-18 14:03:12 +0100 |
commit | 2b9a215805ef50c1af727721d78465398ad53223 (patch) | |
tree | 5b84cd9d8b13e8dc0719b764b4dd05237dd428e8 | |
parent | e1184f131bbce6b5856d428743562021e0f69206 (diff) |
postit dialog is too tall
the initial size hack has come unstuck, do it the now-standard
way or explicitly setting an initial size in code
Change-Id: I89c73e433b1974514fa2a68eb9bd5373142c313a
-rw-r--r-- | cui/source/dialogs/postdlg.cxx | 7 | ||||
-rw-r--r-- | cui/uiconfig/ui/comment.ui | 11 |
2 files changed, 3 insertions, 15 deletions
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 9f37eee2aead..d5c1f4474ac9 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -109,10 +109,9 @@ SvxPostItDialog::SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSe ShowLastAuthor(aAuthorStr, aDateStr); - //lock to initial .ui placeholder size before replacing contents - Size aSize(m_pEditED->get_preferred_size()); - m_pEditED->set_width_request(aSize.Width()); - m_pEditED->set_height_request(aSize.Height()); + //lock to an initial size before replacing contents + m_pEditED->set_width_request(m_pEditED->approximate_char_width() * 40); + m_pEditED->set_height_request(m_pEditED->GetTextHeight() * 10); m_pEditED->SetText(convertLineEnd(aTextStr, GetSystemLineEnd())); diff --git a/cui/uiconfig/ui/comment.ui b/cui/uiconfig/ui/comment.ui index f00b62819192..f25f37f76812 100644 --- a/cui/uiconfig/ui/comment.ui +++ b/cui/uiconfig/ui/comment.ui @@ -206,7 +206,6 @@ <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="wrap_mode">char</property> - <property name="buffer">textbuffer1</property> </object> </child> </object> @@ -309,14 +308,4 @@ <property name="can_focus">False</property> <property name="stock">gtk-go-forward</property> </object> - <object class="GtkTextBuffer" id="textbuffer1"> - <property name="text">12345678901234567890123456789012345 -2 -3 -4 -5 -6 -7 -8</property> - </object> </interface> |