clang
This commit is contained in:
@@ -657,13 +657,15 @@ void MdReaderActivity::render(RenderLock&&) {
|
|||||||
void MdReaderActivity::renderPage() {
|
void MdReaderActivity::renderPage() {
|
||||||
const int lineHeight = renderer.getLineHeight(cachedFontId);
|
const int lineHeight = renderer.getLineHeight(cachedFontId);
|
||||||
|
|
||||||
auto renderLines = [&]() {
|
auto renderLines =
|
||||||
|
[&]() {
|
||||||
int y = cachedOrientedMarginTop;
|
int y = cachedOrientedMarginTop;
|
||||||
for (const auto& line : currentPageLines) {
|
for (const auto& line : currentPageLines) {
|
||||||
if (line.isHR) {
|
if (line.isHR) {
|
||||||
// Draw horizontal rule as a thin line
|
// Draw horizontal rule as a thin line
|
||||||
int hrY = y + lineHeight / 2;
|
int hrY = y + lineHeight / 2;
|
||||||
renderer.drawLine(cachedOrientedMarginLeft + line.indent, hrY, cachedOrientedMarginLeft + viewportWidth, hrY);
|
renderer.drawLine(cachedOrientedMarginLeft + line.indent, hrY, cachedOrientedMarginLeft + viewportWidth,
|
||||||
|
hrY);
|
||||||
} else {
|
} else {
|
||||||
if (line.isCodeBlock) {
|
if (line.isCodeBlock) {
|
||||||
const int barX = cachedOrientedMarginLeft + std::max(line.indent - 6, 0);
|
const int barX = cachedOrientedMarginLeft + std::max(line.indent - 6, 0);
|
||||||
@@ -718,7 +720,8 @@ void MdReaderActivity::renderPage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MdReaderActivity::renderStatusBar() const {
|
void
|
||||||
|
MdReaderActivity::renderStatusBar() const {
|
||||||
const float progress = totalPages > 0 ? (currentPage + 1) * 100.0f / totalPages : 0;
|
const float progress = totalPages > 0 ? (currentPage + 1) * 100.0f / totalPages : 0;
|
||||||
std::string title;
|
std::string title;
|
||||||
if (SETTINGS.statusBarTitle != CrossPointSettings::STATUS_BAR_TITLE::HIDE_TITLE) {
|
if (SETTINGS.statusBarTitle != CrossPointSettings::STATUS_BAR_TITLE::HIDE_TITLE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user