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>
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index de81bd7..4915917 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);
}