mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[apps] Variable Box Controller: improve layouts of variables
This commit is contained in:
committed by
EmilieNumworks
parent
b84972da6a
commit
f1e574d8bc
@@ -37,8 +37,8 @@ View * VariableBoxLeafCell::subviewAtIndex(int index) {
|
||||
void VariableBoxLeafCell::layoutSubviews() {
|
||||
KDCoordinate width = bounds().width();
|
||||
KDCoordinate height = bounds().height();
|
||||
KDSize labelSize = m_labelView.minimalSizeForOptimalDisplay();
|
||||
if (numberOfSubviews() == 3) {
|
||||
KDSize labelSize = m_labelView.minimalSizeForOptimalDisplay();
|
||||
KDSize subtitleSize = m_subtitleView.minimalSizeForOptimalDisplay();
|
||||
m_labelView.setFrame(KDRect(k_separatorThickness+k_widthMargin, k_separatorThickness, labelSize.width(), height/2 - k_separatorThickness));
|
||||
m_subtitleView.setFrame(KDRect(k_separatorThickness+k_widthMargin, height/2, subtitleSize.width(), height/2-k_separatorThickness));
|
||||
@@ -53,8 +53,8 @@ void VariableBoxLeafCell::layoutSubviews() {
|
||||
}
|
||||
return;
|
||||
}
|
||||
m_labelView.setFrame(KDRect(k_separatorThickness+k_widthMargin, k_separatorThickness, width/2-k_separatorThickness-k_widthMargin, height-2*k_separatorThickness));
|
||||
m_subtitleView.setFrame(KDRect(width/2, 1, width/2-k_separatorThickness-k_widthMargin, height-2*k_separatorThickness));
|
||||
m_labelView.setFrame(KDRect(k_separatorThickness+k_widthMargin, k_separatorThickness, labelSize.width(), height-2*k_separatorThickness));
|
||||
m_subtitleView.setFrame(KDRect(k_separatorThickness+k_widthMargin+labelSize.width(), k_separatorThickness, width-k_separatorThickness-k_widthMargin-labelSize.width(), height-2*k_separatorThickness));
|
||||
m_subtitleView.setAlignment(1.0f, 0.5f);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user