summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-21 15:57:22 +0000
committerMiklos Vajna <vmiklos@collabora.com>2019-03-07 18:15:06 +0100
commit115f3749a737de337f6b456dcc84b6e3a6fdfc0e (patch)
treeefbb50cccb294c9b201607dc353a552a12c28be7 /cui
parent0308bfd590a5bdf602254491b1a76e055e6c3f85 (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/68168 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.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 b6a4a8ba4d5c..d202232b951d 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.