-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added stroke size field on line config (#61)
Co-authored-by: Alberto Caliman <[email protected]>
- Loading branch information
1 parent
4593860
commit 050fa40
Showing
4 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
charty/src/main/java/com/himanshoe/charty/line/config/CurveLineConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
package com.himanshoe.charty.line.config | ||
|
||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
|
||
data class CurveLineConfig( | ||
val hasDotMarker: Boolean, | ||
val dotColor: Color = Color.Transparent, | ||
val strokeSize: Dp = 5.dp | ||
) | ||
|
||
internal object CurveLineConfigDefaults { | ||
|
||
fun curveLineConfigDefaults() = CurveLineConfig( | ||
hasDotMarker = true, | ||
dotColor = Color.Green | ||
dotColor = Color.Green, | ||
strokeSize = 5.dp | ||
) | ||
} |
9 changes: 7 additions & 2 deletions
9
charty/src/main/java/com/himanshoe/charty/line/config/LineConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
package com.himanshoe.charty.line.config | ||
|
||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
|
||
data class LineConfig( | ||
val hasSmoothCurve: Boolean = false, | ||
val hasDotMarker: Boolean = false | ||
val hasDotMarker: Boolean = false, | ||
val strokeSize: Dp = 5.dp | ||
) | ||
|
||
internal object LineConfigDefaults { | ||
|
||
fun lineConfigDefaults() = LineConfig( | ||
hasSmoothCurve = true, | ||
hasDotMarker = true | ||
hasDotMarker = true, | ||
strokeSize = 5.dp | ||
) | ||
} |