Skip to content

Commit

Permalink
Tweaks grid theming to use narrow strokes
Browse files Browse the repository at this point in the history
  • Loading branch information
meikpiep committed Oct 7, 2023
1 parent 896295e commit 00ffabf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class GridPaintHolder(gridUI: GridUI) {
innerGridPaint.color = ColorUtils.blendARGB(
MaterialColors.getColor(gridUI, com.google.android.material.R.attr.colorSecondary),
MaterialColors.getColor(gridUI, com.google.android.material.R.attr.colorSurface),
0.85f
0.5f
)

cageSelectedPaint.flags = Paint.ANTI_ALIAS_FLAG
Expand Down Expand Up @@ -187,12 +187,12 @@ class GridPaintHolder(gridUI: GridUI) {
}

fun innerGridPaint(cellSize: Float): Paint {
return innerGridPaint.apply { strokeWidth = gridPaintStrokeWidth(cellSize) }
return innerGridPaint.apply { strokeWidth = gridPaintStrokeWidth(cellSize) / 2 }
}

fun gridPaintRadius(cellSize: Float): Float = 0.21f * cellSize

private fun gridPaintStrokeWidth(cellSize: Float): Float = max(0.042f * cellSize, 1f)
private fun gridPaintStrokeWidth(cellSize: Float): Float = max(0.02f * cellSize, 1f)

fun backgroundPaint(): Paint = backgroundPaint
}

0 comments on commit 00ffabf

Please sign in to comment.