summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-05-12 10:09:16 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2021-05-14 08:59:08 +0200
commitb1099568ffe9ad199c3bf8f279bbac4d7ba445bb (patch)
treeccbbfa35d4bb4ea1ee9514179d36b857c35e4838 /sfx2
parent10bacbcc5ed91a195c74140e05b953f62e46afe7 (diff)
tdf#141458 Set inital column width of Properties and Methods tabs.
Change-Id: I60a51de849d332bbf4579eac3d60834f17cb4fb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115482 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/devtools/ObjectInspectorTreeHandler.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index de81bd7df432..4915917ee087 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -966,6 +966,24 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
mpObjectInspectorWidgets->mpNotebook->connect_enter_page(
LINK(this, ObjectInspectorTreeHandler, NotebookEnterPage));
+ auto nPropertiesDigitWidth
+ = mpObjectInspectorWidgets->mpPropertiesTreeView->get_approximate_digit_width();
+ std::vector<int> aPropertiesWidths;
+ aPropertiesWidths.push_back(nPropertiesDigitWidth * 30);
+ aPropertiesWidths.push_back(nPropertiesDigitWidth * 30);
+ aPropertiesWidths.push_back(nPropertiesDigitWidth * 30);
+ aPropertiesWidths.push_back(nPropertiesDigitWidth * 30);
+ mpObjectInspectorWidgets->mpPropertiesTreeView->set_column_fixed_widths(aPropertiesWidths);
+
+ auto nMethodsDigitWidth
+ = mpObjectInspectorWidgets->mpMethodsTreeView->get_approximate_digit_width();
+ std::vector<int> aMethodsWidths;
+ aMethodsWidths.push_back(nMethodsDigitWidth * 30);
+ aMethodsWidths.push_back(nMethodsDigitWidth * 15);
+ aMethodsWidths.push_back(nMethodsDigitWidth * 30);
+ aMethodsWidths.push_back(nMethodsDigitWidth * 50);
+ mpObjectInspectorWidgets->mpMethodsTreeView->set_column_fixed_widths(aMethodsWidths);
+
pObjectInspectorWidgets->mpPaned->set_position(160);
}