mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-06 15:47:39 +03:00
Reclaim space if we don't show battery Percentage
This commit is contained in:
parent
52995fa722
commit
6905dbd23a
@ -447,7 +447,8 @@ void EpubReaderActivity::renderStatusBar(const int orientedMarginRight, const in
|
|||||||
if (showChapterTitle) {
|
if (showChapterTitle) {
|
||||||
// Centered chatper title text
|
// Centered chatper title text
|
||||||
// Page width minus existing content with 30px padding on each side
|
// Page width minus existing content with 30px padding on each side
|
||||||
const int titleMarginLeft = 50 + 30 + orientedMarginLeft; // 50px for battery
|
const int batterySize = showBattery ? (showBatteryPercentage ? 50 : 20) : 0;
|
||||||
|
const int titleMarginLeft = batterySize + 30 + orientedMarginLeft;
|
||||||
const int titleMarginRight = progressTextWidth + 30 + orientedMarginRight;
|
const int titleMarginRight = progressTextWidth + 30 + orientedMarginRight;
|
||||||
const int availableTextWidth = renderer.getScreenWidth() - titleMarginLeft - titleMarginRight;
|
const int availableTextWidth = renderer.getScreenWidth() - titleMarginLeft - titleMarginRight;
|
||||||
const int tocIndex = epub->getTocIndexForSpineIndex(currentSpineIndex);
|
const int tocIndex = epub->getTocIndexForSpineIndex(currentSpineIndex);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user