Доделки

This commit is contained in:
Book Pauk
2019-01-19 06:31:28 +07:00
parent edf3fb74de
commit 4764259b78

View File

@@ -233,13 +233,17 @@ class TextPage extends Vue {
return; return;
const context = this.context; const context = this.context;
context.font = 'bold ' + this.fontBySize(this.statusBarHeight - 6);
context.fillStyle = this.statusBarColor;
context.strokeStyle = this.statusBarColor;
const h = (this.statusBarTop ? 1 : this.realHeight - this.statusBarHeight); const h = (this.statusBarTop ? 1 : this.realHeight - this.statusBarHeight);
const lh = (this.statusBarTop ? this.statusBarHeight : h); const lh = (this.statusBarTop ? this.statusBarHeight : h);
context.fillStyle = this.backgroundColor;
context.fillRect(0, h, this.realWidth, lh);
context.font = 'bold ' + this.fontBySize(this.statusBarHeight - 6);
context.fillStyle = this.statusBarColor;
context.strokeStyle = this.statusBarColor;
context.fillRect(0, lh, this.realWidth, 1); context.fillRect(0, lh, this.realWidth, 1);
const date = new Date(); const date = new Date();
@@ -252,20 +256,22 @@ class TextPage extends Vue {
this.drawPercentBar(this.realWidth/2, h, this.realWidth/2 - timeW, this.statusBarHeight); this.drawPercentBar(this.realWidth/2, h, this.realWidth/2 - timeW, this.statusBarHeight);
await sleep(60*1000); if (!this.timeRefreshing) {
this.drawStatusBar(); this.timeRefreshing = true;
await sleep(60*1000);
this.timeRefreshing = false;
this.drawStatusBar();
}
} }
drawPage() { drawPage() {
if (!this.lastBook) if (!this.lastBook)
return; return;
//пустой канвас
const canvas = this.canvas;
const context = this.context; const context = this.context;
context.fillStyle = this.backgroundColor; context.fillStyle = this.backgroundColor;
context.fillRect(0, 0, canvas.width, canvas.height); context.fillRect(0, 0, this.realWidth, this.realHeight);
if (!this.book || !this.parsed.textLength) if (!this.book || !this.parsed.textLength)
return; return;