-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 Refactor ui code to package by interface (#265)
- Loading branch information
1 parent
9ec4e40
commit cdef40d
Showing
20 changed files
with
403 additions
and
514 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
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
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
2 changes: 1 addition & 1 deletion
2
...kotlin/com/clipevery/ui/icon/ArrowIcon.kt → ...kotlin/com/clipevery/ui/base/ArrowIcon.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...monMain/kotlin/com/clipevery/ui/OSIcon.kt → ...in/kotlin/com/clipevery/ui/base/OSIcon.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
116 changes: 116 additions & 0 deletions
116
composeApp/src/commonMain/kotlin/com/clipevery/ui/base/SettingsIcon.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 |
---|---|---|
@@ -0,0 +1,116 @@ | ||
package com.clipevery.ui.base | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.remember | ||
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 | ||
|
||
@Composable | ||
fun arrowLeft(): ImageVector { | ||
return remember { | ||
ImageVector.Builder( | ||
name = "arrowLeft", defaultWidth = 24.0.dp, | ||
defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f | ||
).apply { | ||
path( | ||
fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f, | ||
strokeLineCap = StrokeCap.Butt, strokeLineJoin = StrokeJoin.Miter, strokeLineMiter = 4.0f, | ||
pathFillType = PathFillType.NonZero | ||
) { | ||
moveTo(15.41f, 7.41f) | ||
lineTo(14.0f, 6.0f) | ||
lineToRelative(-6.0f, 6.0f) | ||
lineToRelative(6.0f, 6.0f) | ||
lineToRelative(1.41f, -1.41f) | ||
lineTo(10.83f, 12.0f) | ||
lineToRelative(4.58f, -4.59f) | ||
close() | ||
} | ||
} | ||
.build() | ||
} | ||
} | ||
|
||
@Composable | ||
fun arrowRight(): ImageVector { | ||
return remember { | ||
ImageVector.Builder( | ||
name = "arrowRight", defaultWidth = 24.0.dp, | ||
defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f | ||
).apply { | ||
path( | ||
fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f, | ||
strokeLineCap = StrokeCap.Butt, strokeLineJoin = StrokeJoin.Miter, strokeLineMiter = 4.0f, | ||
pathFillType = PathFillType.NonZero | ||
) { | ||
moveTo(8.59f, 16.59f) | ||
lineTo(10.0f, 18.0f) | ||
lineToRelative(6.0f, -6.0f) | ||
lineToRelative(-6.0f, -6.0f) | ||
lineToRelative(-1.41f, 1.41f) | ||
lineTo(13.17f, 12.0f) | ||
lineToRelative(-4.58f, 4.59f) | ||
close() | ||
} | ||
} | ||
.build() | ||
} | ||
} | ||
|
||
@Composable | ||
fun arrowUp(): ImageVector { | ||
return remember { | ||
ImageVector.Builder( | ||
name = "ExpandLessBlack24dp", defaultWidth = 24.0.dp, | ||
defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f | ||
).apply { | ||
path( | ||
fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f, | ||
strokeLineCap = StrokeCap.Butt, strokeLineJoin = StrokeJoin.Miter, strokeLineMiter = 4.0f, | ||
pathFillType = PathFillType.NonZero | ||
) { | ||
moveTo(12.0f, 8.0f) | ||
lineToRelative(-6.0f, 6.0f) | ||
lineToRelative(1.41f, 1.41f) | ||
lineTo(12.0f, 10.83f) | ||
lineToRelative(4.59f, 4.58f) | ||
lineTo(18.0f, 14.0f) | ||
lineToRelative(-6.0f, -6.0f) | ||
close() | ||
} | ||
} | ||
.build() | ||
} | ||
} | ||
|
||
@Composable | ||
fun arrowDown(): ImageVector { | ||
return remember { | ||
ImageVector.Builder( | ||
name = "ExpandMoreBlack24dp", defaultWidth = 24.0.dp, | ||
defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f | ||
).apply { | ||
path( | ||
fill = SolidColor(Color(0xFF000000)), stroke = null, strokeLineWidth = 0.0f, | ||
strokeLineCap = StrokeCap.Butt, strokeLineJoin = StrokeJoin.Miter, strokeLineMiter = 4.0f, | ||
pathFillType = PathFillType.NonZero | ||
) { | ||
moveTo(16.59f, 8.59f) | ||
lineTo(12.0f, 13.17f) | ||
lineTo(7.41f, 8.59f) | ||
lineTo(6.0f, 10.0f) | ||
lineToRelative(6.0f, 6.0f) | ||
lineToRelative(6.0f, -6.0f) | ||
lineToRelative(-1.41f, -1.41f) | ||
close() | ||
} | ||
} | ||
.build() | ||
} | ||
} |
Oops, something went wrong.