mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Reformat source code
This commit is contained in:
@@ -157,7 +157,7 @@ class RingView : View {
|
||||
pRing!!.xfermode = XFERMODE_CLEAR
|
||||
} else {
|
||||
pRing!!.color =
|
||||
backgroundColor!!
|
||||
backgroundColor!!
|
||||
}
|
||||
rect!!.inset(thickness, thickness)
|
||||
activeCanvas.drawArc(rect!!, 0f, 360f, true, pRing!!)
|
||||
@@ -165,17 +165,17 @@ class RingView : View {
|
||||
pRing!!.color = color
|
||||
pRing!!.textSize = textSize
|
||||
|
||||
if (isStrokedTextEnabled){
|
||||
if (isStrokedTextEnabled) {
|
||||
pRing!!.style = Paint.Style.STROKE
|
||||
pRing!!.strokeWidth = textSize / 15f
|
||||
}
|
||||
|
||||
if (enableFontAwesome) pRing!!.typeface = getFontAwesome(context)
|
||||
activeCanvas.drawText(
|
||||
text!!,
|
||||
rect!!.centerX(),
|
||||
rect!!.centerY() + 0.4f * em,
|
||||
pRing!!
|
||||
text!!,
|
||||
rect!!.centerX(),
|
||||
rect!!.centerY() + 0.4f * em,
|
||||
pRing!!
|
||||
)
|
||||
}
|
||||
if (activeCanvas !== canvas) canvas.drawBitmap(internalDrawingCache!!, 0f, 0f, null)
|
||||
|
||||
@@ -146,14 +146,14 @@ class CheckmarkWidgetView : HabitWidgetView {
|
||||
}
|
||||
ring.setThickness(0.03f * width)
|
||||
super.onMeasure(
|
||||
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
|
||||
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
|
||||
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
|
||||
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
|
||||
)
|
||||
}
|
||||
|
||||
private fun init() {
|
||||
val appComponent: HabitsApplicationComponent =
|
||||
(context.applicationContext as HabitsApplication).component
|
||||
(context.applicationContext as HabitsApplication).component
|
||||
preferences = appComponent.preferences
|
||||
ring = findViewById<View>(R.id.scoreRing) as RingView
|
||||
label = findViewById<View>(R.id.label) as TextView
|
||||
|
||||
Reference in New Issue
Block a user