mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-06-05 21:59:17 +02:00
set minimal brush size to 5
This commit is contained in:
@@ -644,7 +644,7 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
||||
|
||||
private var onStrokeWidthBarChangeListener: SeekBar.OnSeekBarChangeListener = object : SeekBar.OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||
brushSize = progress.toFloat()
|
||||
brushSize = Math.max(progress.toFloat(), 5f)
|
||||
updateBrushSize()
|
||||
}
|
||||
|
||||
|
@@ -292,7 +292,7 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) {
|
||||
|
||||
fun setBrushSize(newBrushSize: Float) {
|
||||
mCurrBrushSize = newBrushSize
|
||||
mPaintOptions.strokeWidth = resources.getDimension(R.dimen.full_brush_size) * (newBrushSize / mScaleFactor / 100f)
|
||||
mPaintOptions.strokeWidth = resources.getDimension(R.dimen.full_brush_size) * (mCurrBrushSize / mScaleFactor / 100f)
|
||||
}
|
||||
|
||||
fun setAllowZooming(allowZooming: Boolean) {
|
||||
|
@@ -107,6 +107,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:max="100"
|
||||
android:min="5"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:progress="50" />
|
||||
|
||||
|
Reference in New Issue
Block a user