summaryrefslogtreecommitdiff
path: root/cui/source/options/dbregister.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-23 12:10:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-23 17:16:20 +0200
commita00449bebdcfc491539867862da41133312fcd88 (patch)
treeb0874646e05c5993d225392dbc62c56c434acb42 /cui/source/options/dbregister.cxx
parent08e7b7e5786e6daa2ccf3353050e7acac3415418 (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/options/dbregister.cxx')
-rw-r--r--cui/source/options/dbregister.cxx8
1 files changed, 3 insertions, 5 deletions
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 ) );