Skip to content

Commit

Permalink
Reformat source code
Browse files Browse the repository at this point in the history
  • Loading branch information
iSoron committed Jan 31, 2024
1 parent 45a82b3 commit 248ba50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,25 @@ class RingView : View {
pRing!!.xfermode = XFERMODE_CLEAR
} else {
pRing!!.color =
backgroundColor!!
backgroundColor!!
}
rect!!.inset(thickness, thickness)
activeCanvas.drawArc(rect!!, 0f, 360f, true, pRing!!)
pRing!!.xfermode = null
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 248ba50

Please sign in to comment.