Skip to content
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

Make small UI fixes #7585

Merged
merged 2 commits into from
Jun 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Icon
import androidx.compose.material.ScrollableTabRow
import androidx.compose.material.Tab
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -64,6 +63,7 @@ import io.horizontalsystems.bankwallet.ui.compose.ComposeAppTheme
import io.horizontalsystems.bankwallet.ui.compose.components.GraphicBars
import io.horizontalsystems.bankwallet.ui.compose.components.GraphicBarsWithNegative
import io.horizontalsystems.bankwallet.ui.compose.components.HSpacer
import io.horizontalsystems.bankwallet.ui.compose.components.HsPeriodsScrollableTabRow
import io.horizontalsystems.bankwallet.ui.compose.components.RowUniversal
import io.horizontalsystems.bankwallet.ui.compose.components.TabButtonSecondaryTransparent
import io.horizontalsystems.bankwallet.ui.compose.components.TabItem
Expand Down Expand Up @@ -702,28 +702,31 @@ fun <T> ChartTab(modifier: Modifier = Modifier, tabItems: List<TabItem<T>>, onSe
val tabIndex = tabItems.indexOfFirst { it.selected }

TabPeriod(modifier = modifier) {
ScrollableTabRow(
HsPeriodsScrollableTabRow(
selectedTabIndex = tabIndex,
modifier = Modifier,
backgroundColor = Color.Transparent,
edgePadding = 0.dp,
edgePadding = 12.dp,
indicator = {},
divider = {}
) {
tabItems.forEachIndexed { index, tabItem ->
val selected = tabIndex == index

Tab(
selected = selected,
onClick = { },
Row(
modifier = Modifier.padding(horizontal = 4.dp)
) {
TabButtonSecondaryTransparent(
title = tabItem.title,
onSelect = {
onSelect.invoke(tabItem.item)
},
selected = selected
)
Tab(
selected = selected,
onClick = { },
) {
TabButtonSecondaryTransparent(
title = tabItem.title,
onSelect = {
onSelect.invoke(tabItem.item)
},
selected = selected
)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.Surface
Expand Down Expand Up @@ -192,37 +191,34 @@ private fun PlatformScreen(

@Composable
private fun HeaderContent(title: String, description: String, image: ImageSource) {
Column {
Row(
Row(
modifier = Modifier
.padding(horizontal = 16.dp)
.background(ComposeAppTheme.colors.tyler)
) {
Column(
modifier = Modifier
.height(100.dp)
.padding(horizontal = 16.dp)
.background(ComposeAppTheme.colors.tyler)
.padding(top = 12.dp, bottom = 16.dp)
.weight(1f)
) {
Column(
modifier = Modifier
.padding(top = 12.dp)
.weight(1f)
) {
title3_leah(
text = title,
)
subhead2_grey(
text = description,
modifier = Modifier.padding(top = 4.dp),
maxLines = 3,
overflow = TextOverflow.Ellipsis
)
}
Image(
painter = image.painter(),
contentDescription = null,
modifier = Modifier
.align(Alignment.CenterVertically)
.padding(start = 24.dp)
.size(32.dp),
title3_leah(
text = title,
)
subhead2_grey(
text = description,
modifier = Modifier.padding(top = 4.dp),
maxLines = 3,
overflow = TextOverflow.Ellipsis
)
}
Image(
painter = image.painter(),
contentDescription = null,
modifier = Modifier
.align(Alignment.CenterVertically)
.padding(start = 24.dp)
.size(32.dp),
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun SuggestionsBar(
Text(
text = "$percent%",
modifier = modifier,
style = ComposeAppTheme.typography.subhead1,
style = ComposeAppTheme.typography.captionSB,
color = if (selectEnabled) {
ComposeAppTheme.colors.leah
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ import io.horizontalsystems.bankwallet.ui.compose.components.SelectorItem
import io.horizontalsystems.bankwallet.ui.compose.components.TextImportantWarning
import io.horizontalsystems.bankwallet.ui.compose.components.body_grey50
import io.horizontalsystems.bankwallet.ui.compose.components.body_leah
import io.horizontalsystems.bankwallet.ui.compose.components.captionSB_leah
import io.horizontalsystems.bankwallet.ui.compose.components.caption_lucian
import io.horizontalsystems.bankwallet.ui.compose.components.subhead1_leah
import io.horizontalsystems.bankwallet.ui.compose.observeKeyboardState
import io.horizontalsystems.core.helpers.HudHelper
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -522,7 +522,7 @@ fun SuggestionsBar(
onClick.invoke(wordItem, suggestion)
}
) {
subhead1_leah(text = suggestion)
captionSB_leah(text = suggestion)
}
Spacer(modifier = Modifier.width(12.dp))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ fun ButtonSecondary(
enabled = enabled,
) {
ProvideTextStyle(
value = ComposeAppTheme.typography.subhead1
value = ComposeAppTheme.typography.captionSB
) {
Row(
Modifier
Expand Down
Loading
Loading