diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-23 12:10:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-23 17:16:20 +0200 |
commit | a00449bebdcfc491539867862da41133312fcd88 (patch) | |
tree | b0874646e05c5993d225392dbc62c56c434acb42 /cui/source | |
parent | 08e7b7e5786e6daa2ccf3353050e7acac3415418 (diff) |
replace LogicToPixel uses in SfxTabPages
Change-Id: Ic2ea87bd5bcb8ccee58818b638e70a561fc8f95b
Reviewed-on: https://gerrit.libreoffice.org/79410
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/dbregister.cxx | 8 |
2 files changed, 11 insertions, 9 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 1c738d700e12..e1d8b198572e 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -839,13 +839,17 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(TabPageParent pParent, const , m_xSaveButton(m_xBuilder->weld_button("save")) , m_xResetButton(m_xBuilder->weld_button("reset")) { - Size aSize(LogicToPixel(Size(174, 100), MapMode(MapUnit::MapAppFont))); + Size aSize(m_xEntriesBox->get_approximate_digit_width() * 40, + m_xEntriesBox->get_height_rows(12)); m_xEntriesBox->set_size_request(aSize.Width(), aSize.Height()); - aSize = LogicToPixel(Size(78 , 91), MapMode(MapUnit::MapAppFont)); + aSize = Size(m_xEntriesBox->get_approximate_digit_width() * 19, + m_xEntriesBox->get_height_rows(10)); m_xGroupLBox->set_size_request(aSize.Width(), aSize.Height()); - aSize = LogicToPixel(Size(88, 91), MapMode(MapUnit::MapAppFont)); + aSize = Size(m_xEntriesBox->get_approximate_digit_width() * 21, + m_xEntriesBox->get_height_rows(10)); m_xFunctionBox->set_size_request(aSize.Width(), aSize.Height()); - aSize = LogicToPixel(Size(80, 91), MapMode(MapUnit::MapAppFont)); + aSize = Size(m_xEntriesBox->get_approximate_digit_width() * 20, + m_xEntriesBox->get_height_rows(10)); m_xKeyBox->set_size_request(aSize.Width(), aSize.Height()); // install handler functions diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 782541622bbd..d02b0b118bc2 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -32,8 +32,6 @@ #include "dbregisterednamesconfig.hxx" #include <svx/databaseregistrationui.hxx> -#define TAB_WIDTH1 80 - #define COL_TYPE 0 namespace svx @@ -92,12 +90,12 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage(TabPageParent pParent, cons , m_xPathBox(m_xBuilder->weld_tree_view("pathctrl")) , m_xIter(m_xPathBox->make_iterator()) { - Size aControlSize(248, 147); - aControlSize = LogicToPixel(aControlSize, MapMode(MapUnit::MapAppFont)); + Size aControlSize(m_xPathBox->get_approximate_digit_width() * 60, + m_xPathBox->get_height_rows(35)); m_xPathBox->set_size_request(aControlSize.Width(), aControlSize.Height()); std::vector<int> aWidths; - aWidths.push_back(LogicToPixel(Size(TAB_WIDTH1, 0), MapMode(MapUnit::MapAppFont)).Width()); + aWidths.push_back(m_xPathBox->get_approximate_digit_width() * 20); m_xPathBox->set_column_fixed_widths(aWidths); m_xNew->connect_clicked( LINK( this, DbRegistrationOptionsPage, NewHdl ) ); |