mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] Inline ScrollView::setCommonMargins
This commit is contained in:
committed by
EmilieNumworks
parent
3d254b9ef1
commit
9ea63678e1
@@ -24,7 +24,6 @@ public:
|
||||
setTopMargin(top); setRightMargin(right); setBottomMargin(bottom); setLeftMargin(left);
|
||||
}
|
||||
void setMargins(KDCoordinate m) { setMargins(m, m, m, m); }
|
||||
void setCommonMargins();
|
||||
|
||||
class Decorator {
|
||||
public:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <escher/scroll_view.h>
|
||||
#include <escher/palette.h>
|
||||
#include <escher/metric.h>
|
||||
|
||||
#include <new>
|
||||
|
||||
@@ -45,12 +44,6 @@ KDSize ScrollView::minimalSizeForOptimalDisplay() const {
|
||||
);
|
||||
}
|
||||
|
||||
void ScrollView::setCommonMargins() {
|
||||
setTopMargin(Metric::CommonTopMargin);
|
||||
setRightMargin(Metric::CommonRightMargin);
|
||||
setBottomMargin(Metric::CommonBottomMargin);
|
||||
setLeftMargin(Metric::CommonLeftMargin);
|
||||
}
|
||||
|
||||
void ScrollView::scrollToContentPoint(KDPoint p, bool allowOverscroll) {
|
||||
if (!allowOverscroll && !m_contentView->bounds().contains(p)) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <escher/selectable_table_view.h>
|
||||
#include <escher/clipboard.h>
|
||||
#include <escher/metric.h>
|
||||
#include <assert.h>
|
||||
|
||||
SelectableTableView::SelectableTableView(Responder * parentResponder, TableViewDataSource * dataSource, SelectableTableViewDataSource * selectionDataSource, SelectableTableViewDelegate * delegate) :
|
||||
@@ -8,8 +9,13 @@ SelectableTableView::SelectableTableView(Responder * parentResponder, TableViewD
|
||||
m_selectionDataSource(selectionDataSource),
|
||||
m_delegate(delegate)
|
||||
{
|
||||
setCommonMargins();
|
||||
assert(m_selectionDataSource != nullptr);
|
||||
setMargins(
|
||||
Metric::CommonTopMargin,
|
||||
Metric::CommonRightMargin,
|
||||
Metric::CommonBottomMargin,
|
||||
Metric::CommonLeftMargin
|
||||
);
|
||||
}
|
||||
|
||||
int SelectableTableView::selectedRow() {
|
||||
|
||||
Reference in New Issue
Block a user