mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[ion] Remove unused function and rename longRepetitionScrollSpeed
Change-Id: I11268eb34060c74eb8770ba0eb999f84737c76d8
This commit is contained in:
committed by
Émilie Feral
parent
70cd166da5
commit
af32f33141
@@ -28,7 +28,7 @@ bool SimpleInteractiveCurveViewController::textFieldDidReceiveEvent(TextField *
|
||||
|
||||
bool SimpleInteractiveCurveViewController::handleLeftRightEvent(Ion::Events::Event event) {
|
||||
int direction = event == Ion::Events::Left ? -1 : 1;
|
||||
if (moveCursorHorizontally(direction, Ion::Events::longRepetitionScrollSpeed())) {
|
||||
if (moveCursorHorizontally(direction, Ion::Events::repetitionFactor())) {
|
||||
interactiveCurveViewRange()->panToMakePointVisible(
|
||||
m_cursor->x(), m_cursor->y(),
|
||||
cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio
|
||||
|
||||
@@ -9,7 +9,7 @@ StoreSelectableTableView::StoreSelectableTableView(DoublePairStore * store, Resp
|
||||
}
|
||||
|
||||
bool StoreSelectableTableView::handleEvent(Ion::Events::Event event) {
|
||||
int step = Ion::Events::longRepetitionScrollSpeed();
|
||||
int step = Ion::Events::repetitionFactor();
|
||||
if (event == Ion::Events::Down) {
|
||||
return selectNonHiddenCellAtClippedLocation(selectedColumn(), selectedRow() + step);
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ bool LayoutField::privateHandleMoveEvent(Ion::Events::Event event, bool * should
|
||||
return true;
|
||||
}
|
||||
LayoutCursor result;
|
||||
int step = Ion::Events::longRepetitionScrollSpeed();
|
||||
int step = Ion::Events::repetitionFactor();
|
||||
result = m_contentView.cursor()->cursorAtDirection(DirectionForMoveEvent(event), shouldRecomputeLayout, false, step);
|
||||
if (result.isDefined()) {
|
||||
if (eventShouldUpdateInsertionCursor(event)) {
|
||||
@@ -629,7 +629,7 @@ bool LayoutField::privateHandleSelectionEvent(Ion::Events::Event event, bool * s
|
||||
return false;
|
||||
}
|
||||
Layout addedSelection;
|
||||
int step = Ion::Events::longRepetitionScrollSpeed();
|
||||
int step = Ion::Events::repetitionFactor();
|
||||
LayoutCursor result = m_contentView.cursor()->selectAtDirection(
|
||||
DirectionForSelectionEvent(event),
|
||||
shouldRecomputeLayout,
|
||||
|
||||
@@ -12,7 +12,7 @@ ScrollableView::ScrollableView(Responder * parentResponder, View * view, ScrollV
|
||||
|
||||
bool ScrollableView::handleEvent(Ion::Events::Event event) {
|
||||
KDPoint translation = KDPointZero;
|
||||
KDCoordinate scrollStep = Ion::Events::longRepetitionScrollSpeed() * Metric::ScrollStep;
|
||||
KDCoordinate scrollStep = Ion::Events::repetitionFactor() * Metric::ScrollStep;
|
||||
if (event == Ion::Events::Left) {
|
||||
KDCoordinate movementToEdge = contentOffset().x();
|
||||
if (movementToEdge > 0) {
|
||||
|
||||
@@ -151,7 +151,7 @@ HighlightCell * SelectableTableView::selectedCell() {
|
||||
}
|
||||
|
||||
bool SelectableTableView::handleEvent(Ion::Events::Event event) {
|
||||
int step = Ion::Events::longRepetitionScrollSpeed();
|
||||
int step = Ion::Events::repetitionFactor();
|
||||
if (event == Ion::Events::Down) {
|
||||
return selectCellAtClippedLocation(selectedColumn(), selectedRow() + step);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ bool TextArea::handleEvent(Ion::Events::Event event) {
|
||||
if (handleBoxEvent(event)) {
|
||||
return true;
|
||||
}
|
||||
int step = Ion::Events::longRepetitionScrollSpeed();
|
||||
int step = Ion::Events::repetitionFactor();
|
||||
if (event == Ion::Events::ShiftLeft || event == Ion::Events::ShiftRight) {
|
||||
selectLeftRight(event == Ion::Events::ShiftLeft, false, step);
|
||||
return true;
|
||||
|
||||
@@ -58,8 +58,7 @@ bool isShiftActive();
|
||||
bool isAlphaActive();
|
||||
bool isLockActive();
|
||||
void setLongRepetition(bool longRepetition);
|
||||
bool isLongRepetition();
|
||||
int longRepetitionScrollSpeed();
|
||||
int repetitionFactor();
|
||||
void updateModifiersFromEvent(Event e);
|
||||
void didPressNewKey();
|
||||
|
||||
|
||||
@@ -37,11 +37,7 @@ void setLongRepetition(bool longRepetition) {
|
||||
sLongRepetition = longRepetition;
|
||||
}
|
||||
|
||||
bool isLongRepetition() {
|
||||
return sLongRepetition;
|
||||
}
|
||||
|
||||
int longRepetitionScrollSpeed() {
|
||||
int repetitionFactor() {
|
||||
return sLongRepetition ? 5 : 1;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user