summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-25 15:56:35 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-26 11:09:08 +0200
commit1b6c01bdf769582508c852b24ab9d2a04fc0956f (patch)
treea87d5f3a50e64acd28b337cc98ebbdd805d0f6b6 /sw
parent90e3af16c12f94f487ff7516048a239db1d2ff7d (diff)
Related: tdf#156137 allow GtkLinkButton to wrap
Change-Id: I00ca5a9056b64389f1d55aa8ca6a9d5fd8a16372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154899 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index 162724a1035c..338b0f1f7cac 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -43,6 +43,16 @@ AccessibilityCheckEntry::AccessibilityCheckEntry(
if (m_pAccessibilityIssue->canGotoIssue())
{
m_xGotoButton->set_label(m_pAccessibilityIssue->m_aIssueText);
+
+ // int nPrefWidth(m_xGotoButton->get_preferred_size().Width());
+ int nMaxWidth = m_xGotoButton->get_approximate_digit_width() * 10;
+ // if (nPrefWidth > nMaxWidth)
+ {
+ // tdf#156137 allow LinkButton label to wrap
+ m_xGotoButton->set_label_wrap(true);
+ m_xGotoButton->set_size_request(nMaxWidth, -1);
+ }
+
m_xGotoButton->connect_activate_link(
LINK(this, AccessibilityCheckEntry, GotoButtonClicked));
m_xLabel->set_visible(false);