summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-13 09:28:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-13 13:48:58 +0100
commit4a6041235d923755eda3b3f5e54f6ae5a5436072 (patch)
treedc1706ff1c834b4fb905dc2af1168150d4b99b1d /cui/source/dialogs
parent0b5fea74963d499be5d59acee29ba89137f9f0cd (diff)
size group is ignoring hidden widgets, leading to labels overlapping entries
https://developer.gnome.org/gtk3/stable/GtkSizeGroup.html#gtk-size-group-set-ignore-hidden "Measuring the size of hidden widgets ... they will report a size of 0 nowadays, and thus, their size will not affect the other size group members" Which is unfortunate. So before we hide any labels, take the size group width and set it as explicit preferred size. Change-Id: If7c0f1ebd9f03914c74fde85b876549de76853c2 Reviewed-on: https://gerrit.libreoffice.org/85097 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/hlinettp.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 18df910f6054..fda37be4a3cd 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -40,12 +40,21 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
, m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet"))
, m_xRbtLinktypFTP(xBuilder->weld_radio_button("linktyp_ftp"))
, m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target")))
+ , m_xFtTarget(xBuilder->weld_label("target_label"))
, m_xFtLogin(xBuilder->weld_label("login_label"))
, m_xEdLogin(xBuilder->weld_entry("login"))
, m_xFtPassword(xBuilder->weld_label("password_label"))
, m_xEdPassword(xBuilder->weld_entry("password"))
, m_xCbAnonymous(xBuilder->weld_check_button("anonymous"))
{
+ // gtk_size_group_set_ignore_hidden, "Measuring the size of hidden widgets
+ // ... they will report a size of 0 nowadays, and thus, their size will
+ // not affect the other size group members", which is unfortunate. So here
+ // before we hide the labels, take the size group width and set it as
+ // explicit preferred size on a label that won't be hidden
+ auto nLabelWidth = m_xFtTarget->get_preferred_size().Width();
+ m_xFtTarget->set_size_request(nLabelWidth, -1);
+
m_xCbbTarget->SetSmartProtocol(INetProtocol::Http);
InitStdControls();