Kaydet (Commit) 12d12fa8 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

TSCP: fix oversizing of ListBox-es by defining max lines & chars

Change-Id: I47e8018c5f2c0ea890b5a11ac7cc03fafb7d1eed
Reviewed-on: https://gerrit.libreoffice.org/45205Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 0f2f6285
......@@ -194,16 +194,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
m_pClassificationListBox->setMaxWidthChars(20);
m_pClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maHelper.GetBACNames())
m_pClassificationListBox->InsertEntry(rName);
m_pInternationalClassificationListBox->setMaxWidthChars(20);
m_pInternationalClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maInternationalHelper.GetBACNames())
m_pInternationalClassificationListBox->InsertEntry(rName);
if (!maHelper.GetMarkings().empty())
{
m_pMarkingListBox->setMaxWidthChars(20);
m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl));
......@@ -216,14 +219,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pMarkingLabel->Show(false);
}
m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
m_pIntellectualPropertyPartListBox->SetDropDownLineCount(5);
m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyParts())
m_pIntellectualPropertyPartListBox->InsertEntry(rName);
m_pRecentlyUsedListBox->setMaxWidthChars(5);
m_pRecentlyUsedListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectRecentlyUsedHdl));
bool bExpand = officecfg::Office::Common::Classification::IntellectualPropertySectionExpanded::get();
......
......@@ -49,7 +49,7 @@ ClassificationEditView::ClassificationEditView(vcl::Window* pParent, WinBits nBi
Color aBgColor = rStyleSettings.GetWindowColor();
float fScaleFactor = GetDPIScaleFactor();
set_width_request(600 * fScaleFactor);
set_width_request(500 * fScaleFactor);
set_height_request(100 * fScaleFactor);
SetMapMode(MapMode(MapUnit::MapTwip));
......
......@@ -291,6 +291,7 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
......@@ -304,27 +305,14 @@
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkTreeView" id="intellectualPropertyPartLB">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="intellectualPropertyPartAddButton">
<property name="label" translatable="yes" context="classificationdialog|intellectualPropertyPartAddButton">Add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">2</property>
......@@ -359,7 +347,19 @@
</packing>
</child>
<child>
<placeholder/>
<object class="GtkTreeView" id="intellectualPropertyPartLB">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<placeholder/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment