-
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.
Merge pull request #25 from SOPT-all/init/setting-shadow
[init] shadow 기초세팅
- Loading branch information
Showing
2 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
207 changes: 207 additions & 0 deletions
207
app/src/main/java/org/android/bbangzip/presentation/type/BbangZipShadowType.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,207 @@ | ||
package org.android.bbangzip.presentation.type | ||
|
||
import androidx.compose.ui.unit.dp | ||
import org.android.bbangzip.ui.theme.defaultBbangZipColors | ||
import org.android.bbangzip.ui.theme.defaultBbangZipOpacity | ||
import org.android.bbangzip.ui.theme.model.ShadowOption | ||
|
||
enum class BbangZipShadowType( | ||
val shadowOptions: List<ShadowOption>, | ||
) { | ||
EMPTY( | ||
listOf(), | ||
), | ||
NORMAL( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 2.dp, | ||
offsetX = 0.dp, | ||
offsetY = 1.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 1.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
EMPHASIZE( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = 2.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 4.dp, | ||
offsetX = 0.dp, | ||
offsetY = 1.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 1.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
STRONG( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 12.dp, | ||
offsetX = 0.dp, | ||
offsetY = 6.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = 4.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 4.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
HEAVY( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 20.dp, | ||
offsetX = 0.dp, | ||
offsetY = 16.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 16.dp, | ||
offsetX = 0.dp, | ||
offsetY = 8.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
HEAVY_INVERSE( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 20.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-16).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 16.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-8).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
STRONG_INVERSE( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 12.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-6).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-4).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 4.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
EMPHASIZE_INVERSE( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 8.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-2).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 4.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-1).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 1.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
NORMAL_INVERSE( | ||
listOf( | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12), | ||
blur = 2.dp, | ||
offsetX = 0.dp, | ||
offsetY = (-1).dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 1.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
ShadowOption( | ||
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8), | ||
blur = 1.dp, | ||
offsetX = 0.dp, | ||
offsetY = 0.dp, | ||
spread = 0.dp, | ||
), | ||
), | ||
), | ||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/org/android/bbangzip/ui/theme/model/ShadowOption.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,12 @@ | ||
package org.android.bbangzip.ui.theme.model | ||
|
||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.Dp | ||
|
||
data class ShadowOption( | ||
val color: Color, | ||
val blur: Dp, | ||
val offsetX: Dp, | ||
val offsetY: Dp, | ||
val spread: Dp, | ||
) |