[apps/probability] Add a grey outline on editable text fields in

calculation page

Change-Id: Id9f0c10338d36cffad9072748349114e362f341b
This commit is contained in:
Émilie Feral
2017-04-17 11:06:20 +02:00
parent 67f8dc61a9
commit 72ab4cb00c

View File

@@ -106,6 +106,19 @@ void CalculationController::ContentView::layoutSubviews() {
void CalculationController::ContentView::drawRect(KDContext * ctx, KDRect rect) const {
ctx->fillRect(bounds(), KDColorWhite);
KDCoordinate titleHeight = KDText::stringSize("", KDText::FontSize::Small).height()+k_titleHeightMargin;
KDSize charSize = KDText::stringSize(" ");
KDCoordinate xCoordinate = ImageTableView::k_imageCellWidth + k_textWidthMargin;
KDCoordinate numberOfCharacters = strlen(I18n::translate(m_calculation->legendForParameterAtIndex(0)));
xCoordinate += numberOfCharacters*charSize.width() + k_textWidthMargin;
ctx->drawRect(KDRect(xCoordinate-1, titleHeight+ImageCell::k_imageMargin-1, k_textFieldWidth+1, ImageCell::k_imageHeight+1), Palette::GreyMiddle);
xCoordinate += k_textFieldWidth + k_textWidthMargin;
numberOfCharacters = strlen(I18n::translate(m_calculation->legendForParameterAtIndex(1)));
xCoordinate += numberOfCharacters*charSize.width() + k_textWidthMargin;
ctx->drawRect(KDRect(xCoordinate-1, titleHeight+ImageCell::k_imageMargin-1, k_textFieldWidth+1, ImageCell::k_imageHeight+1), Palette::GreyMiddle);
}
LawCurveView * CalculationController::ContentView::lawCurveView() {