[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 18 19:08:50 UTC 2018
vcl/unx/gtk3/gtk3gtkinst.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 13f451715619aab016bb1d1a02b3c6577178e295
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 18 09:10:30 2018 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Jul 18 21:08:26 2018 +0200
only ellipize menubutton label when requesting narrower size
Change-Id: I32f4856756910ec1db8d37854b6e57dbec5aae76
Reviewed-on: https://gerrit.libreoffice.org/57618
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5c6fc9901d3e..26bc4dbb0e3a 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3054,7 +3054,6 @@ public:
m_pBox = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0));
m_pLabel = GTK_LABEL(gtk_label_new_with_mnemonic(sLabel.getStr()));
- gtk_label_set_ellipsize(m_pLabel, PANGO_ELLIPSIZE_MIDDLE);
gtk_label_set_mnemonic_widget(m_pLabel, GTK_WIDGET(m_pMenuButton));
gtk_box_pack_start(m_pBox, GTK_WIDGET(m_pLabel), false, false, 0);
@@ -3063,6 +3062,13 @@ public:
gtk_widget_show_all(GTK_WIDGET(m_pBox));
}
+ virtual void set_size_request(int nWidth, int nHeight) override
+ {
+ // tweak the label to get a narrower size to stick
+ gtk_label_set_ellipsize(m_pLabel, PANGO_ELLIPSIZE_MIDDLE);
+ gtk_widget_set_size_request(m_pWidget, nWidth, nHeight);
+ }
+
virtual void set_label(const OUString& rText) override
{
::set_label(m_pLabel, rText);
More information about the Libreoffice-commits
mailing list