|
@@ -128,8 +128,12 @@ class AnnotationAttributeView @JvmOverloads constructor(
|
|
|
set(value) {
|
|
|
if (field == value) return
|
|
|
field = value
|
|
|
- thickness = brush.size
|
|
|
update()
|
|
|
+ when (value) {
|
|
|
+ Brush.Fountain -> if (thickness > brush.maxSize) thickness = brush.maxSize
|
|
|
+ Brush.Marker -> thickness = brush.maxSize
|
|
|
+ }
|
|
|
+ onChangeListener?.onChange(this)
|
|
|
}
|
|
|
init {
|
|
|
setupOpacitySeekBar()
|
|
@@ -253,6 +257,16 @@ class AnnotationAttributeView @JvmOverloads constructor(
|
|
|
}
|
|
|
|
|
|
private fun updateThickness() {
|
|
|
+ when (brush) {
|
|
|
+ Brush.Fountain -> {
|
|
|
+ seekBar_readerAnnotationProperty_thickness.max = brush.maxSize
|
|
|
+ seekBar_readerAnnotationProperty_thickness.isEnabled = true
|
|
|
+ }
|
|
|
+ Brush.Marker -> {
|
|
|
+ seekBar_readerAnnotationProperty_thickness.max = brush.maxSize
|
|
|
+ seekBar_readerAnnotationProperty_thickness.isEnabled = false
|
|
|
+ }
|
|
|
+ }
|
|
|
seekBar_readerAnnotationProperty_thickness.progress = thickness
|
|
|
tv_readerAnnotationProperty_thicknessValue.text = thickness.toString()
|
|
|
waveLineView_readerAnnotationProperty.setThickness(thickness.toFloat())
|