Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 7 additions & 3 deletions composeApp/src/commonMain/kotlin/me/androidbox/qrcraft/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ import androidx.compose.foundation.layout.safeContentPadding
import androidx.compose.material3.Button
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import me.androidbox.qrcraft.ui.AppTheme
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.ui.tooling.preview.Preview

import qrcraft.composeapp.generated.resources.Res
import qrcraft.composeapp.generated.resources.compose_multiplatform

@Composable
@Preview
fun App() {
MaterialTheme {
AppTheme {
var showContent by remember { mutableStateOf(false) }
Column(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package me.androidbox.qrcraft.ui

import androidx.compose.ui.graphics.Color


val Primary = Color(0xFFEBFF69)
val Surface = Color(0xFFEDF2F5)
val SurfaceHigher = Color(0xFFFFFFFF)
val OnSurface = Color(0xFF273037)
val OnSurfaceAlt = Color(0xFF505F6A)
val Overlay = Color(0x80000000)
val OnOverlay = Color(0xFFFFFFFF)

val Link = Color(0xFF373F05)
val LinkBG = Color(0x4DEBFF69)

val Error = Color(0xFFF12244)
val Success = Color(0xFF4DDA9D)

val Text = Color(0xFF583DC5)
val TextBG = Color(0x1A583DC5)

val Contact = Color(0xFF259570)
val ContactBG = Color(0x1A259570)

val Geo = Color(0xFFB51D5C)
val GeoBG = Color(0x1AB51D5C)

val Phone = Color(0xFFC86017)
val PhoneBG = Color(0x1AC86017)

val WiFi = Color(0xFF1F44CD)
val WiFiBG = Color(0x1A1F44CD)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.androidbox.qrcraft.ui

import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Shapes
import androidx.compose.ui.unit.dp

val AppShapes = Shapes(
small = RoundedCornerShape(4.dp),
medium = RoundedCornerShape(8.dp),
large = RoundedCornerShape(16.dp)
)
31 changes: 31 additions & 0 deletions composeApp/src/commonMain/kotlin/me/androidbox/qrcraft/ui/Theme.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package me.androidbox.qrcraft.ui

import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable

private val LightColorScheme = lightColorScheme(
primary = Primary,
onPrimary = OnSurface,
surface = Surface,
onSurface = OnSurface,
background = SurfaceHigher,
onBackground = OnSurfaceAlt,
error = Error,
onError = SurfaceHigher
)

@Composable
fun AppTheme(
useDarkTheme: Boolean = false,
content: @Composable () -> Unit
) {
val colorScheme = LightColorScheme

MaterialTheme(
colorScheme = colorScheme,
typography = appTypography(),
shapes = AppShapes,
content = content
)
}
51 changes: 51 additions & 0 deletions composeApp/src/commonMain/kotlin/me/androidbox/qrcraft/ui/Type.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package me.androidbox.qrcraft.ui

import androidx.compose.material3.Typography
import androidx.compose.runtime.Composable
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import org.jetbrains.compose.resources.Font
import qrcraft.composeapp.generated.resources.Res
import qrcraft.composeapp.generated.resources.suse_medium
import qrcraft.composeapp.generated.resources.suse_regular
import qrcraft.composeapp.generated.resources.suse_semibold


@Composable
fun appTypography(): Typography {

val susFontFamily = FontFamily(
Font(Res.font.suse_regular, FontWeight.Normal),
Font(Res.font.suse_medium, FontWeight.Medium),
Font(Res.font.suse_semibold, FontWeight.SemiBold)
)

return Typography(
titleMedium = TextStyle(
fontFamily = susFontFamily,
fontWeight = FontWeight.SemiBold,
fontSize = 28.sp,
lineHeight = 32.sp
),
titleSmall = TextStyle(
fontFamily = susFontFamily,
fontWeight = FontWeight.SemiBold,
fontSize = 19.sp,
lineHeight = 24.sp
),
labelLarge = TextStyle(
fontFamily = susFontFamily,
fontWeight = FontWeight.Medium,
fontSize = 16.sp,
lineHeight = 20.sp
),
bodyLarge = TextStyle(
fontFamily = susFontFamily,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 20.sp
)
)
}