[code] Larger console button in MenuController.

Change-Id: Ia8a495d4de95a4a9d6fee698975b2c7e831c4c43
This commit is contained in:
Léa Saviot
2017-11-15 18:04:50 +01:00
committed by Romain Goyet
parent c543145aae
commit f2e2e93888
5 changed files with 40 additions and 22 deletions

View File

@@ -6,7 +6,8 @@ Button::Button(Responder * parentResponder, I18n::Message textBody, Invocation i
HighlightCell(),
Responder(parentResponder),
m_messageTextView(size, textBody, 0.5f, 0.5f, textColor),
m_invocation(invocation)
m_invocation(invocation),
m_size(size)
{
}
@@ -40,5 +41,5 @@ void Button::setHighlighted(bool highlight) {
KDSize Button::minimalSizeForOptimalDisplay() const {
KDSize textSize = m_messageTextView.minimalSizeForOptimalDisplay();
return KDSize(textSize.width() + k_horizontalMargin, textSize.height() + k_verticalMargin);
return KDSize(textSize.width() + (m_size == KDText::FontSize::Small ? k_horizontalMarginSmall : k_horizontalMarginLarge), textSize.height() + k_verticalMargin);
}