summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-21 15:57:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-21 20:48:50 +0100
commit7bc3ac14a88206ed3cafa123e92877e0a47cfb15 (patch)
tree35d8b8761b1d879bf48d9fe8bac7e78e22c0b3e6 /cui
parente0a8803fa3b053eeccb226fc69d5005e63d00c99 (diff)
menu of currency combobox in format-cells is too narrow
we want the combobox to be narrower than it wants to be. To make that happen we have only the option of shrinking the cell renderer of the combobox area. And that is also used by the menu. Setting a small value of e.g. 1 works to let the combobox not request more width than that, and the combobox will correctly render within the wider size it actually gets. But then the menu is a min width menu, which is undesirable, we want the menu to be as wide as it can be. So calculate what part of the combobox belongs to the cell area and set the widest cell area we can within the overall combobox width, resulting in the widest menu we can get. Change-Id: Ie3e9960a320a70471ac21d2a88f32632cafa951f Reviewed-on: https://gerrit.libreoffice.org/68167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/numfmt.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index c0e66b6ceb05..e51de20a02cb 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -234,7 +234,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(TabPageParent pParent,
auto nWidth = approximate_char_width() * 26;
m_xLbCategory->set_size_request(nWidth, m_xLbCategory->get_height_rows(7));
m_xLbFormat->set_size_request(nWidth, m_xLbFormat->get_height_rows(5));
- m_xLbCurrency->set_size_request(1, -1); // width of 1, so real width will be that of its LbFormat sibling
+ m_xLbCurrency->set_size_request(nWidth, -1); // width of 1, so real width will be that of its LbFormat sibling
// Initially remove the "Automatically" entry.
m_xLbCurrency->set_active(-1); // First ensure that nothing is selected.