Skip to content

Commit 9e601c2

Browse files
committed
Clean up remaining TextScaleFactor references
1 parent 6adab96 commit 9e601c2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lib/src/ui/char_metrics.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import 'dart:ui';
22

3+
import 'package:flutter/painting.dart';
34
import 'package:xterm/src/ui/terminal_text_style.dart';
45

5-
Size calcCharSize(TerminalStyle style, double textScaleFactor) {
6+
Size calcCharSize(TerminalStyle style, TextScaler textScaler) {
67
const test = 'mmmmmmmmmm';
78

89
final textStyle = style.toTextStyle();
910
final builder = ParagraphBuilder(textStyle.getParagraphStyle());
10-
builder.pushStyle(textStyle.getTextStyle(textScaleFactor: textScaleFactor));
11+
builder.pushStyle(textStyle.getTextStyle(textScaler: textScaler));
1112
builder.addText(test);
1213

1314
final paragraph = builder.build();

lib/src/ui/paragraph_cache.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ParagraphCache {
1717
return _cache[key];
1818
}
1919

20-
/// Applies [style] and [textScaleFactor] to [text] and lays it out to create
20+
/// Applies [style] and [textScaler] to [text] and lays it out to create
2121
/// a [Paragraph]. The [Paragraph] is cached and can be retrieved with the
2222
/// same [key] by calling [getLayoutFromCache].
2323
Paragraph performAndCacheLayout(

test/src/terminal_view_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void main() {
306306
});
307307
});
308308

309-
group('TerminalView.textScaleFactor', () {
309+
group('TerminalView.textScaler', () {
310310
testWidgets('works', (tester) async {
311311
final terminal = Terminal();
312312

@@ -345,7 +345,7 @@ void main() {
345345
);
346346
});
347347

348-
testWidgets('can obtain textScaleFactor from parent', (tester) async {
348+
testWidgets('can obtain textScaler from parent', (tester) async {
349349
final terminal = Terminal();
350350

351351
await tester.pumpWidget(

0 commit comments

Comments
 (0)