-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Make statistics menu less sad - decorations and colour #4203
Conversation
This reverts commit 6140ad1.
could happen with for example ranking where long position such as #10000 may qualify for noticeable decoration
to make text more visible on them
|
app/src/main/java/de/westnordost/streetcomplete/view/LaurelWreath.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/view/LaurelWreath.kt
Outdated
Show resolved
Hide resolved
val canvasHeight: Int = bounds.height() | ||
val circleRadius: Float = Math.min(canvasWidth, canvasHeight).toFloat() / 2f | ||
|
||
val niceSubtleGreen: Paint = Paint().apply { setARGB(255, 152, 184, 126) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a private field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that it should be moved out of that function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just parroting what the IDE warns about. Android Studio warns about creation of objects in the draw
function for performance reasons. Since this paint is always the same, it also makes sense.
It's weird that your Android studio didn't display a warning there? Did you switch off warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that your Android studio didn't display a warning there? Did you switch off warnings?
I switched off some that were consistently annoying and useless. I can enable them again, and triage them again - maybe they improved something.
app/src/main/java/de/westnordost/streetcomplete/view/LaurelWreath.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/westnordost/streetcomplete/view/LaurelWreath.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
// right side | ||
val flippedBitmap = bitmap.flipHorizontally() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI you can also apply a matrix transformation (to flip the bitmap) on drawing on the canvas, might be easier.
(But you are not exactly drawing thousands of wreaths each frame, so perfomance of creating dozens of intermediate bitmaps is no issue)
I like it, others do not like it :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one small remark
fixes #3414
example with extra placeholder to demonstrate styling