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