get pixel ratio from view (#1259)

pull/1262/head
Pwiz 2 years ago committed by GitHub
parent ebef9d7d95
commit ba6fa9c6f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/src/widgets/editor.dart
  2. 2
      lib/src/widgets/raw_editor.dart
  3. 2
      lib/src/widgets/text_block.dart

@ -477,8 +477,8 @@ class QuillEditorState extends State<QuillEditor>
selectionColor = selectionTheme.selectionColor ??
cupertinoTheme.primaryColor.withOpacity(0.40);
cursorRadius ??= const Radius.circular(2);
cursorOffset = Offset(
iOSHorizontalOffset / MediaQuery.of(context).devicePixelRatio, 0);
cursorOffset =
Offset(iOSHorizontalOffset / View.of(context).devicePixelRatio, 0);
} else {
textSelectionControls = materialTextSelectionControls;
paintCursorAboveText = false;

@ -968,7 +968,7 @@ class RawEditorState extends EditorState
widget.selectionColor,
widget.enableInteractiveSelection,
_hasFocus,
MediaQuery.of(context).devicePixelRatio,
View.of(context).devicePixelRatio,
_cursorCont);
return editableTextLine;
}

@ -159,7 +159,7 @@ class EditableTextBlock extends StatelessWidget {
color,
enableInteractiveSelection,
hasFocus,
MediaQuery.of(context).devicePixelRatio,
View.of(context).devicePixelRatio,
cursorCont);
final nodeTextDirection = getDirectionOfNode(line);
children.add(Directionality(

Loading…
Cancel
Save