Files
ReelShort/lib/pages/player/widgets/player_text_scale.dart
T

20 lines
596 B
Dart

// Author: fruit.com.cn
import '../../../l10n/app_localizations.dart';
/// 播放信息小号文字比例。
const double playerTextSizeSmall = 0.9;
/// 播放信息标准文字比例。
const double playerTextSizeStandard = 1.0;
/// 播放信息大号文字比例。
const double playerTextSizeLarge = 1.15;
/// 返回播放信息文字档位的本地化名称。
String playerTextSizeLabel(AppLocalizations l10n, double scale) {
if (scale <= playerTextSizeSmall) return l10n.textSizeSmall;
if (scale >= playerTextSizeLarge) return l10n.textSizeLarge;
return l10n.textSizeStandard;
}