summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/FontFeaturesDialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs/FontFeaturesDialog.cxx')
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index fae448b6a283..04255cb13a6b 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -73,18 +73,26 @@ void FontFeaturesDialog::initialize()
rFilteredFontFeatures.push_back(rFontFeature);
}
- fillGrid(rFilteredFontFeatures);
+ int nRowHeight = fillGrid(rFilteredFontFeatures);
m_xContentWindow->set_size_request(
-1, std::min(std::max(m_xContentWindow->get_preferred_size().Height(),
m_xContentGrid->get_preferred_size().Height()),
static_cast<tools::Long>(300L)));
+ if (nRowHeight)
+ {
+ // tdf#141333 use row height + the 6 px spacing of contentGrid
+ m_xContentWindow->vadjustment_set_step_increment(nRowHeight + 6);
+ }
+
updateFontPreview();
}
-void FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures)
+int FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFeatures)
{
+ int nRowHeight(0);
+
vcl::font::FeatureParser aParser(m_sFontName);
auto aExistingFeatures = aParser.getFeaturesMap();
@@ -140,8 +148,13 @@ void FontFeaturesDialog::fillGrid(std::vector<vcl::font::Feature> const& rFontFe
aCurrentItem.m_xCheck->show();
}
+ nRowHeight
+ = std::max<int>(nRowHeight, aCurrentItem.m_xContainer->get_preferred_size().Height());
+
i++;
}
+
+ return nRowHeight;
}
void FontFeaturesDialog::updateFontPreview()