forked from phodal/auto-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
fix(mpp-idea): replace Material Icons with local IdeaComposeIcons #8
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
185 changes: 185 additions & 0 deletions
185
mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea/toolwindow/IdeaComposeIcons.kt
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| package cc.unitmesh.devins.idea.toolwindow | ||
|
|
||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.graphics.PathFillType | ||
| import androidx.compose.ui.graphics.SolidColor | ||
| import androidx.compose.ui.graphics.StrokeCap | ||
| import androidx.compose.ui.graphics.StrokeJoin | ||
| import androidx.compose.ui.graphics.vector.ImageVector | ||
| import androidx.compose.ui.graphics.vector.path | ||
| import androidx.compose.ui.unit.dp | ||
|
|
||
| /** | ||
| * Icon provider for IntelliJ IDEA Compose UI. | ||
| * These icons are defined using ImageVector paths to avoid dependency on Material Icons | ||
| * which is not available in IntelliJ's Compose environment. | ||
| */ | ||
| object IdeaComposeIcons { | ||
|
|
||
| /** | ||
| * Settings icon (gear/cog) | ||
| */ | ||
| val Settings: ImageVector by lazy { | ||
| ImageVector.Builder( | ||
| name = "Settings", | ||
| defaultWidth = 24.dp, | ||
| defaultHeight = 24.dp, | ||
| viewportWidth = 24f, | ||
| viewportHeight = 24f | ||
| ).apply { | ||
| path( | ||
| fill = SolidColor(Color.Black), | ||
| pathFillType = PathFillType.EvenOdd | ||
| ) { | ||
| // Gear icon path | ||
| moveTo(19.14f, 12.94f) | ||
| curveToRelative(0.04f, -0.31f, 0.06f, -0.63f, 0.06f, -0.94f) | ||
| curveToRelative(0f, -0.32f, -0.02f, -0.64f, -0.07f, -0.94f) | ||
| lineToRelative(2.03f, -1.58f) | ||
| curveToRelative(0.18f, -0.14f, 0.23f, -0.41f, 0.12f, -0.61f) | ||
| lineToRelative(-1.92f, -3.32f) | ||
| curveToRelative(-0.12f, -0.22f, -0.37f, -0.29f, -0.59f, -0.22f) | ||
| lineToRelative(-2.39f, 0.96f) | ||
| curveToRelative(-0.5f, -0.38f, -1.03f, -0.7f, -1.62f, -0.94f) | ||
| lineToRelative(-0.36f, -2.54f) | ||
| curveToRelative(-0.04f, -0.24f, -0.24f, -0.41f, -0.48f, -0.41f) | ||
| horizontalLineToRelative(-3.84f) | ||
| curveToRelative(-0.24f, 0f, -0.43f, 0.17f, -0.47f, 0.41f) | ||
| lineToRelative(-0.36f, 2.54f) | ||
| curveToRelative(-0.59f, 0.24f, -1.13f, 0.56f, -1.62f, 0.94f) | ||
| lineToRelative(-2.39f, -0.96f) | ||
| curveToRelative(-0.22f, -0.08f, -0.47f, 0f, -0.59f, 0.22f) | ||
| lineTo(2.74f, 8.87f) | ||
| curveToRelative(-0.12f, 0.21f, -0.08f, 0.47f, 0.12f, 0.61f) | ||
| lineToRelative(2.03f, 1.58f) | ||
| curveToRelative(-0.05f, 0.3f, -0.09f, 0.63f, -0.09f, 0.94f) | ||
| curveToRelative(0f, 0.31f, 0.02f, 0.64f, 0.07f, 0.94f) | ||
| lineToRelative(-2.03f, 1.58f) | ||
| curveToRelative(-0.18f, 0.14f, -0.23f, 0.41f, -0.12f, 0.61f) | ||
| lineToRelative(1.92f, 3.32f) | ||
| curveToRelative(0.12f, 0.22f, 0.37f, 0.29f, 0.59f, 0.22f) | ||
| lineToRelative(2.39f, -0.96f) | ||
| curveToRelative(0.5f, 0.38f, 1.03f, 0.7f, 1.62f, 0.94f) | ||
| lineToRelative(0.36f, 2.54f) | ||
| curveToRelative(0.05f, 0.24f, 0.24f, 0.41f, 0.48f, 0.41f) | ||
| horizontalLineToRelative(3.84f) | ||
| curveToRelative(0.24f, 0f, 0.44f, -0.17f, 0.47f, -0.41f) | ||
| lineToRelative(0.36f, -2.54f) | ||
| curveToRelative(0.59f, -0.24f, 1.13f, -0.56f, 1.62f, -0.94f) | ||
| lineToRelative(2.39f, 0.96f) | ||
| curveToRelative(0.22f, 0.08f, 0.47f, 0f, 0.59f, -0.22f) | ||
| lineToRelative(1.92f, -3.32f) | ||
| curveToRelative(0.12f, -0.22f, 0.07f, -0.47f, -0.12f, -0.61f) | ||
| lineToRelative(-2.01f, -1.58f) | ||
| close() | ||
| moveTo(12f, 15.6f) | ||
| curveToRelative(-1.98f, 0f, -3.6f, -1.62f, -3.6f, -3.6f) | ||
| reflectiveCurveToRelative(1.62f, -3.6f, 3.6f, -3.6f) | ||
| reflectiveCurveToRelative(3.6f, 1.62f, 3.6f, 3.6f) | ||
| reflectiveCurveToRelative(-1.62f, 3.6f, -3.6f, 3.6f) | ||
| close() | ||
| } | ||
| }.build() | ||
| } | ||
|
|
||
| /** | ||
| * Build/Tool icon (wrench) | ||
| */ | ||
| val Build: ImageVector by lazy { | ||
| ImageVector.Builder( | ||
| name = "Build", | ||
| defaultWidth = 24.dp, | ||
| defaultHeight = 24.dp, | ||
| viewportWidth = 24f, | ||
| viewportHeight = 24f | ||
| ).apply { | ||
| path( | ||
| fill = SolidColor(Color.Black) | ||
| ) { | ||
| moveTo(22.7f, 19f) | ||
| lineToRelative(-9.1f, -9.1f) | ||
| curveToRelative(0.9f, -2.3f, 0.4f, -5f, -1.5f, -6.9f) | ||
| curveToRelative(-2f, -2f, -5f, -2.4f, -7.4f, -1.3f) | ||
| lineTo(9f, 6f) | ||
| lineTo(6f, 9f) | ||
| lineTo(1.6f, 4.7f) | ||
| curveTo(0.4f, 7.1f, 0.9f, 10.1f, 2.9f, 12.1f) | ||
| curveToRelative(1.9f, 1.9f, 4.6f, 2.4f, 6.9f, 1.5f) | ||
| lineToRelative(9.1f, 9.1f) | ||
| curveToRelative(0.4f, 0.4f, 1f, 0.4f, 1.4f, 0f) | ||
| lineToRelative(2.3f, -2.3f) | ||
| curveToRelative(0.5f, -0.4f, 0.5f, -1.1f, 0.1f, -1.4f) | ||
| close() | ||
| } | ||
| }.build() | ||
| } | ||
|
|
||
| /** | ||
| * Error icon (circle with X) | ||
| */ | ||
| val Error: ImageVector by lazy { | ||
| ImageVector.Builder( | ||
| name = "Error", | ||
| defaultWidth = 24.dp, | ||
| defaultHeight = 24.dp, | ||
| viewportWidth = 24f, | ||
| viewportHeight = 24f | ||
| ).apply { | ||
| path( | ||
| fill = SolidColor(Color.Black) | ||
| ) { | ||
| moveTo(12f, 2f) | ||
| curveTo(6.48f, 2f, 2f, 6.48f, 2f, 12f) | ||
| reflectiveCurveToRelative(4.48f, 10f, 10f, 10f) | ||
| reflectiveCurveToRelative(10f, -4.48f, 10f, -10f) | ||
| reflectiveCurveTo(17.52f, 2f, 12f, 2f) | ||
| close() | ||
| moveTo(13f, 17f) | ||
| horizontalLineToRelative(-2f) | ||
| verticalLineToRelative(-2f) | ||
| horizontalLineToRelative(2f) | ||
| verticalLineToRelative(2f) | ||
| close() | ||
| moveTo(13f, 13f) | ||
| horizontalLineToRelative(-2f) | ||
| lineTo(11f, 7f) | ||
| horizontalLineToRelative(2f) | ||
| verticalLineToRelative(6f) | ||
| close() | ||
| } | ||
| }.build() | ||
| } | ||
|
|
||
| /** | ||
| * CheckCircle icon (circle with checkmark) | ||
| */ | ||
| val CheckCircle: ImageVector by lazy { | ||
| ImageVector.Builder( | ||
| name = "CheckCircle", | ||
| defaultWidth = 24.dp, | ||
| defaultHeight = 24.dp, | ||
| viewportWidth = 24f, | ||
| viewportHeight = 24f | ||
| ).apply { | ||
| path( | ||
| fill = SolidColor(Color.Black) | ||
| ) { | ||
| moveTo(12f, 2f) | ||
| curveTo(6.48f, 2f, 2f, 6.48f, 2f, 12f) | ||
| reflectiveCurveToRelative(4.48f, 10f, 10f, 10f) | ||
| reflectiveCurveToRelative(10f, -4.48f, 10f, -10f) | ||
| reflectiveCurveTo(17.52f, 2f, 12f, 2f) | ||
| close() | ||
| moveTo(10f, 17f) | ||
| lineToRelative(-5f, -5f) | ||
| lineToRelative(1.41f, -1.41f) | ||
| lineTo(10f, 14.17f) | ||
| lineToRelative(7.59f, -7.59f) | ||
| lineTo(19f, 8f) | ||
| lineToRelative(-9f, 9f) | ||
| close() | ||
| } | ||
| }.build() | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 KDoc says "Error icon (circle with X)" but the vector draws an exclamation mark inside a circle; consider updating the comment to match the icon.
🤖 Was this useful? React with 👍 or 👎