mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[escher] Implement minimlSizeForOptimalDisplay in text view and button
Change-Id: I86cbc1cc9314623a1deb69f2dd36ac8c45338d92
This commit is contained in:
@@ -45,12 +45,12 @@ void HeaderViewController::ContentView::layoutSubviews() {
|
||||
m_mainView->setFrame(mainViewFrame);
|
||||
} else {
|
||||
KDRect mainViewFrame(0, k_headerHeight + 1, bounds().width(), bounds().height() - k_headerHeight - 1);
|
||||
KDCoordinate buttonOneWidth = m_buttonOne.textSize().width();
|
||||
KDCoordinate buttonTwoWidth = m_buttonTwo.textSize().width();
|
||||
KDCoordinate buttonThreeWidth = m_buttonThree.textSize().width();
|
||||
KDRect buttonOneFrame(0, 0, buttonOneWidth + k_buttonTextMargin, k_headerHeight);
|
||||
KDRect buttonTwoFrame(buttonOneWidth + k_buttonTextMargin, 0, buttonTwoWidth + k_buttonTextMargin, k_headerHeight);
|
||||
KDRect buttonThreeFrame(buttonOneWidth + buttonTwoWidth + 2*k_buttonTextMargin, 0, buttonThreeWidth + k_buttonTextMargin, k_headerHeight);
|
||||
KDCoordinate buttonOneWidth = m_buttonOne.minimalSizeForOptimalDisplay().width();
|
||||
KDCoordinate buttonTwoWidth = m_buttonTwo.minimalSizeForOptimalDisplay().width();
|
||||
KDCoordinate buttonThreeWidth = m_buttonThree.minimalSizeForOptimalDisplay().width();
|
||||
KDRect buttonOneFrame(0, 0, buttonOneWidth, k_headerHeight);
|
||||
KDRect buttonTwoFrame(buttonOneWidth, 0, buttonTwoWidth, k_headerHeight);
|
||||
KDRect buttonThreeFrame(buttonOneWidth + buttonTwoWidth, 0, buttonThreeWidth, k_headerHeight);
|
||||
switch(m_numberOfButtons) {
|
||||
case 3:
|
||||
m_buttonThree.setFrame(buttonThreeFrame);
|
||||
|
||||
Reference in New Issue
Block a user