Skip to content

Fix blurriness on focused line in code view - #5732

Merged
elliette merged 4 commits into
flutter:masterfrom
elliette:issue-5708
Apr 27, 2023
Merged

elliette merged 4 commits into
flutter:masterfrom
elliette:issue-5708

Conversation

@elliette

Copy link
Copy Markdown
Member

Fixes #5708
Work towards #5703

Before:

Screenshot 2023-04-27 at 2 34 16 PM

After:

Screenshot 2023-04-27 at 2 34 29 PM

@@ -1207,7 +1207,7 @@ class _LineItemState extends State<LineItem>
// to allow us to render this as a proper overlay as similar
// functionality exists to render the selection handles properly.
Opacity(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the point of using a completely transparent opacity widget now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the comment above this widget still relevant?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm the comment (and this code) is 2 years old: #2665. I can investigate the feasibility if you think that's better!

I think I accidentally made it semi-transparent when debugging #4651, and forgot to switch it back

@kenzieschmoll

Copy link
Copy Markdown
Member

If everything is WAI with the Opacity widget removed, then maybe that is stale code that we don't need?

@kenzieschmoll

Copy link
Copy Markdown
Member

Oh wait a minute, with opacity 0 the text doesn't show up at all. I was getting this backwards for some reason thinking that we were laying a transparent widget on top of the text instead of hiding the text itself. The comment makes sense now. LGTM, then. Whether we can remove the workaround in the comment or not, doing so may be out of scope.

@kenzieschmoll

Copy link
Copy Markdown
Member

unless you've already applied a fix and verified things are WAI with your last commit :)

@elliette

Copy link
Copy Markdown
Member Author

Oh wait a minute, with opacity 0 the text doesn't show up at all. I was getting this backwards for some reason thinking that we were laying a transparent widget on top of the text instead of hiding the text itself. The comment makes sense now. LGTM, then. Whether we can remove the workaround in the comment or not, doing so may be out of scope.

Just removed it by using our TextSpan measurement utility. Let me know what you think! Happy to change it back as well

// 'Icons.label_important' icon.
const colIconSize = 13.0;
const colLeftOffset = -3.0;
final colLeftOffset = -3.0 + widthToCurrentColumn;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change to widthToCurrentColumn - 3.0 (if the 3 is still needed here? a comment could help)

@elliette
elliette merged commit e42ab56 into flutter:master Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlighted line is blurry when paused at breakpoint

2 participants