-
Notifications
You must be signed in to change notification settings - Fork 33
Add ability to change lineBrush color on event level #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ import androidx.compose.animation.core.infiniteRepeatable | |
| import androidx.compose.animation.core.tween | ||
| import androidx.compose.material3.MaterialTheme | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.graphics.Brush | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.unit.Dp | ||
| import androidx.compose.ui.unit.dp | ||
|
|
@@ -70,6 +71,7 @@ object JetLimeEventDefaults { | |
| * @param pointAnimation The animation for the point, if any. | ||
| * @param pointStrokeWidth The stroke width of the point. Defaults to [PointStrokeWidth]. | ||
| * @param pointStrokeColor The stroke color of the point. Defaults to the primary color from MaterialTheme's color scheme. | ||
| * @param lineBrush the [Brush] for drawing the line to the next event | ||
| * @return A [JetLimeEventStyle] object configured with the given parameters. | ||
| */ | ||
| @Composable | ||
|
|
@@ -83,6 +85,7 @@ object JetLimeEventDefaults { | |
| pointAnimation: EventPointAnimation? = null, | ||
| pointStrokeWidth: Dp = PointStrokeWidth, | ||
| pointStrokeColor: Color = MaterialTheme.colorScheme.primary, | ||
| lineBrush: Brush? = null, | ||
|
||
| ): JetLimeEventStyle = JetLimeEventStyle( | ||
| pointPlacement = pointPlacement, | ||
| pointType = pointType, | ||
|
|
@@ -92,6 +95,7 @@ object JetLimeEventDefaults { | |
| pointAnimation = pointAnimation, | ||
| pointStrokeWidth = pointStrokeWidth, | ||
| pointStrokeColor = pointStrokeColor, | ||
| lineBrush = lineBrush, | ||
| ).apply { | ||
| this.position = position | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ package com.pushpal.jetlime | |
|
|
||
| import androidx.compose.runtime.Immutable | ||
| import androidx.compose.runtime.Stable | ||
| import androidx.compose.ui.graphics.Brush | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.unit.Dp | ||
|
|
||
|
|
@@ -52,6 +53,7 @@ class JetLimeEventStyle internal constructor( | |
| val pointAnimation: EventPointAnimation?, | ||
| val pointStrokeWidth: Dp, | ||
| val pointStrokeColor: Color, | ||
| val lineBrush: Brush?, | ||
|
||
| ) { | ||
|
|
||
| /** The position of the event in the UI component. */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for
lineBrushparameter should clarify that passingnull(the default) will use thelineBrushfrom theJetLimeStyle. Consider updating to: "The [Brush] for drawing the line to the next event. If null (default), uses thelineBrushfromJetLimeStyle."