mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher/poincare] Coding style
This commit is contained in:
@@ -81,8 +81,16 @@ void ScrollView::scrollToContentPoint(KDPoint p, bool allowOverscroll) {
|
||||
|
||||
// Handle cases when the size of the view has decreased.
|
||||
setContentOffset(KDPoint(
|
||||
std::min(contentOffset().x(), std::max<KDCoordinate>(minimalSizeForOptimalDisplay().width() - bounds().width(), KDCoordinate{0})),
|
||||
std::min(contentOffset().y(), std::max<KDCoordinate>(minimalSizeForOptimalDisplay().height() - bounds().height(), 0))));
|
||||
std::min(
|
||||
contentOffset().x(),
|
||||
std::max<KDCoordinate>(
|
||||
minimalSizeForOptimalDisplay().width() - bounds().width(),
|
||||
KDCoordinate(0))),
|
||||
std::min(
|
||||
contentOffset().y(),
|
||||
std::max<KDCoordinate>(
|
||||
minimalSizeForOptimalDisplay().height() - bounds().height(),
|
||||
KDCoordinate(0)))));
|
||||
}
|
||||
|
||||
void ScrollView::scrollToContentRect(KDRect rect, bool allowOverscroll) {
|
||||
|
||||
@@ -31,7 +31,7 @@ void TreeNode::rename(uint16_t identifier, bool unregisterPreviousIdentifier) {
|
||||
|
||||
TreeNode * TreeNode::parent() const {
|
||||
assert(m_parentIdentifier != m_identifier);
|
||||
return TreeHandle::hasNode(m_parentIdentifier) ? TreePool::sharedPool()->node(m_parentIdentifier) : nullptr;
|
||||
return TreeHandle::hasNode(m_parentIdentifier) ? TreePool::sharedPool()->node(m_parentIdentifier) : nullptr;
|
||||
}
|
||||
|
||||
TreeNode * TreeNode::root() {
|
||||
|
||||
Reference in New Issue
Block a user