Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix frame positions for speedlimit/ align for AA #21365

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Conversation

0xRe1nk0
Copy link
Contributor

No description provided.

@0xRe1nk0 0xRe1nk0 linked an issue Nov 18, 2024 that may be closed by this pull request
6 tasks
android:orientation="vertical"
android:paddingHorizontal="9dp"
android:paddingVertical="9dp"
android:translationX="-6dp"
Copy link
Member

Choose a reason for hiding this comment

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

Is it ok in UI?

Comment on lines 511 to 514
return new Rect((int) (speedlimitRect.left + padding * density),
(int) (speedlimitRect.top + padding * density),
(int) (speedlimitRect.right - padding * density),
(int) (speedlimitRect.bottom - padding * density));
Copy link
Member

Choose a reason for hiding this comment

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

padding * density can be stored in local variable

float frameCenterPosition = (calculatedFrameTextHeight / 2) + halfTextHeight;
float yDescr = frameCenterPosition + contentRect.top;

canvas.drawText(textLimitDescription, xDescr, yDescr, textPaint);
Copy link
Member

Choose a reason for hiding this comment

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

It looks like some calculations in drawSpeedLimit & drawSpeedLimitDescription are similar, can we try to simplify it?

@Chumva Chumva merged commit b13b6c9 into r4.9 Nov 20, 2024
3 checks passed
@Chumva Chumva deleted the speedlimit_frame/aa_fix branch November 20, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speedometer jumps when speed limit sign in shown
2 participants