mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/settings] SelectableViewWithMessages: position the additional
messages at the bottom of the view
This commit is contained in:
@@ -6,6 +6,8 @@ using namespace Shared;
|
||||
|
||||
namespace Settings {
|
||||
|
||||
static inline KDCoordinate maxCoordinate(KDCoordinate x, KDCoordinate y) { return x > y ? x : y; }
|
||||
|
||||
SelectableViewWithMessages::SelectableViewWithMessages(SelectableTableView * selectableTableView) :
|
||||
m_selectableTableView(selectableTableView),
|
||||
m_numberOfMessages(0)
|
||||
@@ -45,7 +47,7 @@ void SelectableViewWithMessages::layoutSubviews(bool force) {
|
||||
|
||||
// Layout the text
|
||||
KDCoordinate textHeight = KDFont::SmallFont->glyphSize().height();
|
||||
KDCoordinate defOrigin = tableHeight + (bounds().height() - tableHeight - m_numberOfMessages*textHeight - Metric::CommonTopMargin)/2;
|
||||
KDCoordinate defOrigin = maxCoordinate(bounds().height() - Metric::CommonBottomMargin - m_numberOfMessages*textHeight, tableHeight);
|
||||
|
||||
for (int i = 0; i < m_numberOfMessages; i++) {
|
||||
m_messageLines[i].setFrame(KDRect(0, defOrigin, bounds().width(), textHeight), force);
|
||||
|
||||
Reference in New Issue
Block a user