This commit is contained in:
+1
-1
@@ -245,7 +245,7 @@
|
|||||||
<label class="setting-label">{{ t('columnGap') }}</label>
|
<label class="setting-label">{{ t('columnGap') }}</label>
|
||||||
<div class="font-size-controls">
|
<div class="font-size-controls">
|
||||||
<p-button icon="pi pi-minus" size="small" rounded outlined (click)="decreaseGap()"></p-button>
|
<p-button icon="pi pi-minus" size="small" rounded outlined (click)="decreaseGap()"></p-button>
|
||||||
<span class="font-size-value">{{ gap }}px</span>
|
<span class="font-size-value">{{ gap * 100 | number : '1.0-0' }}%</span>
|
||||||
<p-button icon="pi pi-plus" size="small" rounded outlined (click)="increaseGap()"></p-button>
|
<p-button icon="pi pi-plus" size="small" rounded outlined (click)="increaseGap()"></p-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+8
-5
@@ -1,3 +1,4 @@
|
|||||||
|
import {DecimalPipe} from '@angular/common';
|
||||||
import {Component, inject, Input, OnDestroy, OnInit} from '@angular/core';
|
import {Component, inject, Input, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {Button} from 'primeng/button';
|
import {Button} from 'primeng/button';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
@@ -16,6 +17,7 @@ import {themes} from '../../../readers/ebook-reader/state/themes.constant';
|
|||||||
selector: 'app-epub-reader-preferences-component',
|
selector: 'app-epub-reader-preferences-component',
|
||||||
imports: [
|
imports: [
|
||||||
Button,
|
Button,
|
||||||
|
DecimalPipe,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
TranslocoDirective,
|
TranslocoDirective,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@@ -249,25 +251,26 @@ export class EpubReaderPreferencesComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
increaseLineHeight() {
|
increaseLineHeight() {
|
||||||
if (this.lineHeight < 3) {
|
if (this.lineHeight < 3) {
|
||||||
this.lineHeight += 0.1;
|
this.lineHeight = Math.round((this.lineHeight + 0.1) * 10) / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
decreaseLineHeight() {
|
decreaseLineHeight() {
|
||||||
if (this.lineHeight > 1) {
|
if (this.lineHeight > 1) {
|
||||||
this.lineHeight -= 0.1;
|
this.lineHeight = Math.round((this.lineHeight - 0.1) * 10) / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
increaseGap() {
|
increaseGap() {
|
||||||
if (this.gap < 100) {
|
|
||||||
this.gap += 5;
|
if (this.gap < 0.5) {
|
||||||
|
this.gap = Math.round((this.gap + 0.05) * 100) / 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
decreaseGap() {
|
decreaseGap() {
|
||||||
if (this.gap > 0) {
|
if (this.gap > 0) {
|
||||||
this.gap -= 5;
|
this.gap = Math.round((this.gap - 0.05) * 100) / 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user