[kandinsky] Move to KDFont

This commit is contained in:
Romain Goyet
2018-10-09 16:41:24 +02:00
committed by LeaNumworks
parent 29882768bd
commit f8beae3b86
149 changed files with 564 additions and 610 deletions

View File

@@ -7,8 +7,8 @@
namespace Solver {
IntervalController::ContentView::ContentView(SelectableTableView * selectableTableView) :
m_instructions0(KDText::FontSize::Small, I18n::Message::ApproximateSolutionIntervalInstruction0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen),
m_instructions1(KDText::FontSize::Small, I18n::Message::ApproximateSolutionIntervalInstruction1, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen),
m_instructions0(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction0, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen),
m_instructions1(KDFont::SmallFont, I18n::Message::ApproximateSolutionIntervalInstruction1, 0.5f, 0.5f, KDColorBlack, Palette::WallScreen),
m_selectableTableView(selectableTableView)
{
}
@@ -33,7 +33,7 @@ View * IntervalController::ContentView::subviewAtIndex(int index) {
}
void IntervalController::ContentView::layoutSubviews() {
KDCoordinate textHeight = KDText::charSize(KDText::FontSize::Small).height();
KDCoordinate textHeight = KDFont::SmallFont->glyphSize().height();
m_instructions0.setFrame(KDRect(0, k_topMargin/2-textHeight, bounds().width(), textHeight));
m_instructions1.setFrame(KDRect(0, k_topMargin/2, bounds().width(), textHeight));
m_selectableTableView->setFrame(KDRect(0, k_topMargin, bounds().width(), bounds().height()-k_topMargin));