mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
format fix
This commit is contained in:
parent
f7a0c8ac65
commit
fff39db2dc
@ -5,7 +5,6 @@
|
||||
#include <GfxRenderer.h>
|
||||
#include <SDCardManager.h>
|
||||
|
||||
|
||||
#include "CrossPointSettings.h"
|
||||
#include "CrossPointState.h"
|
||||
#include "EpubReaderChapterSelectionActivity.h"
|
||||
@ -281,9 +280,8 @@ void EpubReaderActivity::jumpToPercent(int percent) {
|
||||
const size_t cumulative = epub->getCumulativeSpineItemSize(targetSpineIndex);
|
||||
const size_t spineSize = (cumulative > prevCumulative) ? (cumulative - prevCumulative) : 0;
|
||||
// Store a normalized position within the spine so it can be applied once loaded.
|
||||
pendingSpineProgress = (spineSize == 0) ? 0.0f
|
||||
: static_cast<float>(targetSize - prevCumulative) /
|
||||
static_cast<float>(spineSize);
|
||||
pendingSpineProgress =
|
||||
(spineSize == 0) ? 0.0f : static_cast<float>(targetSize - prevCumulative) / static_cast<float>(spineSize);
|
||||
if (pendingSpineProgress < 0.0f) {
|
||||
pendingSpineProgress = 0.0f;
|
||||
} else if (pendingSpineProgress > 1.0f) {
|
||||
|
||||
@ -9,7 +9,7 @@ namespace {
|
||||
// Fine/coarse slider step sizes for percent adjustments.
|
||||
constexpr int kSmallStep = 1;
|
||||
constexpr int kLargeStep = 10;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void EpubReaderPercentSelectionActivity::onEnter() {
|
||||
ActivityWithSubactivity::onEnter();
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "activities/ActivityWithSubactivity.h"
|
||||
#include "MappedInputManager.h"
|
||||
#include "activities/ActivityWithSubactivity.h"
|
||||
|
||||
class EpubReaderPercentSelectionActivity final : public ActivityWithSubactivity {
|
||||
public:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user