-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
108 additions
and
136 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
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/com/neptuneclient/voidui/objects/CornerRadius.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,16 @@ | ||
package com.neptuneclient.voidui.objects | ||
|
||
data class CornerRadius( | ||
val topLeft: Float, | ||
val topRight: Float, | ||
val bottomRight: Float, | ||
val bottomLeft: Float, | ||
) { | ||
|
||
companion object { | ||
fun all(value: Float) = CornerRadius(value, value, value, value) | ||
} | ||
|
||
fun isEmpty() = (topLeft + topRight + bottomLeft + bottomRight) == 0.0f | ||
|
||
} |
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
25 changes: 25 additions & 0 deletions
25
src/main/kotlin/com/neptuneclient/voidui/theme/DefaultStyles.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,25 @@ | ||
package com.neptuneclient.voidui.theme | ||
|
||
import com.neptuneclient.voidui.objects.CornerRadius | ||
import com.neptuneclient.voidui.utils.Font | ||
import java.awt.Color | ||
|
||
data class DefaultStyles( | ||
val regularText: TextStyle, | ||
val smallText: TextStyle = regularText, | ||
val mediumText: TextStyle = regularText, | ||
val largeText: TextStyle = regularText, | ||
|
||
val image: ImageStyle | ||
) | ||
|
||
class ImageStyle( | ||
val cornerRadius: CornerRadius, | ||
) | ||
|
||
data class TextStyle( | ||
val font: Font, | ||
val color: Color, | ||
val size: Int, | ||
val letterSpacing: Float | ||
) |
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,5 +1,5 @@ | ||
package com.neptuneclient.voidui.theme | ||
|
||
class Theme( | ||
|
||
abstract class Theme( | ||
val defaultStyles: DefaultStyles | ||
) |
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
Oops, something went wrong.