From 2194d0d1dfa6412e4748a9ed6c75c889b60a8355 Mon Sep 17 00:00:00 2001 From: ThomasSession <thomas.r@getsession.org> Date: Wed, 10 Jul 2024 16:07:41 +1000 Subject: [PATCH] Moving theme classes into their own package --- .../ui/DisappearingMessages.kt | 6 ++--- .../ui/DisappearingMessagesPreview.kt | 6 ++--- .../start/home/StartConversation.kt | 14 +++++------ .../start/invitefriend/InviteFriend.kt | 10 ++++---- .../start/newmessage/NewMessage.kt | 12 ++++----- .../conversation/v2/MessageDetailActivity.kt | 20 +++++++-------- .../thoughtcrime/securesms/home/EmptyView.kt | 18 ++++++------- .../securesms/home/SeedReminder.kt | 14 +++++------ .../OnboardingBackPressAlertDialog.kt | 2 +- .../securesms/onboarding/landing/Landing.kt | 14 +++++------ .../onboarding/loadaccount/LoadAccount.kt | 8 +++--- .../securesms/onboarding/loading/Loading.kt | 6 ++--- .../MessageNotifications.kt | 20 +++++++-------- .../onboarding/pickname/PickDisplayName.kt | 8 +++--- .../securesms/onboarding/ui/ContinueButton.kt | 2 +- .../securesms/preferences/QRCodeActivity.kt | 6 ++--- .../securesms/preferences/SettingsActivity.kt | 4 +-- .../recoverypassword/RecoveryPassword.kt | 16 ++++++------ .../thoughtcrime/securesms/ui/AlertDialog.kt | 5 ++++ .../org/thoughtcrime/securesms/ui/Carousel.kt | 2 ++ .../thoughtcrime/securesms/ui/Components.kt | 11 ++++++++ .../org/thoughtcrime/securesms/ui/Util.kt | 1 + .../ui/color/ColorsFromPreferences.kt | 25 ++++++++++++------- .../securesms/ui/components/AppBar.kt | 10 ++++---- .../securesms/ui/components/Border.kt | 4 +-- .../securesms/ui/components/Button.kt | 12 ++++----- .../securesms/ui/components/ButtonStyle.kt | 6 ++--- .../securesms/ui/components/ButtonType.kt | 4 +-- .../securesms/ui/components/QR.kt | 8 +++--- .../securesms/ui/components/QrImage.kt | 4 +-- .../securesms/ui/components/RadioButton.kt | 6 ++--- .../securesms/ui/components/SessionTabRow.kt | 14 +++++------ .../securesms/ui/components/Text.kt | 16 ++++++------ .../securesms/ui/{ => theme}/Colors.kt | 20 +-------------- .../securesms/ui/{ => theme}/Dimensions.kt | 2 +- .../ui/{ => theme}/SessionTypography.kt | 2 +- .../securesms/ui/{ => theme}/ThemeColors.kt | 3 +-- .../securesms/ui/{ => theme}/Themes.kt | 3 ++- 38 files changed, 176 insertions(+), 168 deletions(-) rename app/src/main/java/org/thoughtcrime/securesms/ui/{ => theme}/Colors.kt (62%) rename app/src/main/java/org/thoughtcrime/securesms/ui/{ => theme}/Dimensions.kt (95%) rename app/src/main/java/org/thoughtcrime/securesms/ui/{ => theme}/SessionTypography.kt (97%) rename app/src/main/java/org/thoughtcrime/securesms/ui/{ => theme}/ThemeColors.kt (98%) rename app/src/main/java/org/thoughtcrime/securesms/ui/{ => theme}/Themes.kt (97%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessages.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessages.kt index ebec37db2e..4f41408b16 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessages.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessages.kt @@ -18,14 +18,14 @@ import androidx.compose.ui.unit.dp import network.loki.messenger.R import network.loki.messenger.libsession_util.util.ExpiryMode import org.thoughtcrime.securesms.ui.Callbacks -import org.thoughtcrime.securesms.ui.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalDimensions import org.thoughtcrime.securesms.ui.NoOpCallbacks import org.thoughtcrime.securesms.ui.OptionsCard import org.thoughtcrime.securesms.ui.RadioOption -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.SlimOutlineButton import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.extraSmall +import org.thoughtcrime.securesms.ui.theme.extraSmall import org.thoughtcrime.securesms.ui.fadingEdges typealias ExpiryCallbacks = Callbacks<ExpiryMode> diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessagesPreview.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessagesPreview.kt index 8c4df83f6c..d043cc314f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessagesPreview.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/disappearingmessages/ui/DisappearingMessagesPreview.kt @@ -10,9 +10,9 @@ import androidx.compose.ui.unit.dp import network.loki.messenger.libsession_util.util.ExpiryMode import org.thoughtcrime.securesms.conversation.disappearingmessages.ExpiryType import org.thoughtcrime.securesms.conversation.disappearingmessages.State -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider @Preview(widthDp = 450, heightDp = 700) @Composable diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt index d1518b6d33..9becfc5762 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/home/StartConversation.kt @@ -21,16 +21,16 @@ import org.thoughtcrime.securesms.conversation.start.NullStartConversationDelega import org.thoughtcrime.securesms.conversation.start.StartConversationDelegate import org.thoughtcrime.securesms.ui.Divider import org.thoughtcrime.securesms.ui.ItemButton -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.AppBar import org.thoughtcrime.securesms.ui.components.QrImage import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.small -import org.thoughtcrime.securesms.ui.xl +import org.thoughtcrime.securesms.ui.theme.small +import org.thoughtcrime.securesms.ui.theme.xl @Composable internal fun StartConversationScreen( diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/invitefriend/InviteFriend.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/invitefriend/InviteFriend.kt index eae8fdafaa..ed1b089e87 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/invitefriend/InviteFriend.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/invitefriend/InviteFriend.kt @@ -15,16 +15,16 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.AppBar import org.thoughtcrime.securesms.ui.components.SlimOutlineButton import org.thoughtcrime.securesms.ui.components.SlimOutlineCopyButton import org.thoughtcrime.securesms.ui.components.border import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.small @Composable internal fun InviteFriend( diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/newmessage/NewMessage.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/newmessage/NewMessage.kt index 04607bbfd4..f8e3afe622 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/start/newmessage/NewMessage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/start/newmessage/NewMessage.kt @@ -24,11 +24,11 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.emptyFlow import network.loki.messenger.R import org.thoughtcrime.securesms.ui.LoadingArcOr -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.AppBar import org.thoughtcrime.securesms.ui.components.BorderlessButtonWithIcon import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode @@ -36,7 +36,7 @@ import org.thoughtcrime.securesms.ui.components.PrimaryOutlineButton import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField import org.thoughtcrime.securesms.ui.components.SessionTabRow import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.small private val TITLES = listOf(R.string.enter_account_id, R.string.qrScan) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt index 8b7fdd06b7..fddc815bec 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/MessageDetailActivity.kt @@ -64,17 +64,17 @@ import org.thoughtcrime.securesms.ui.Divider import org.thoughtcrime.securesms.ui.GetString import org.thoughtcrime.securesms.ui.HorizontalPagerIndicator import org.thoughtcrime.securesms.ui.LargeItemButton -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider import org.thoughtcrime.securesms.ui.TitledText -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.baseBold -import org.thoughtcrime.securesms.ui.baseMonospace -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.blackAlpha40 -import org.thoughtcrime.securesms.ui.destructiveButtonColors +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.baseBold +import org.thoughtcrime.securesms.ui.theme.baseMonospace +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.blackAlpha40 +import org.thoughtcrime.securesms.ui.theme.destructiveButtonColors import org.thoughtcrime.securesms.ui.setComposeContent import javax.inject.Inject diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt b/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt index d9540cb405..6e154e69b9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/EmptyView.kt @@ -16,15 +16,15 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import network.loki.messenger.R import org.thoughtcrime.securesms.ui.Divider -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.h4 -import org.thoughtcrime.securesms.ui.h8 -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.h4 +import org.thoughtcrime.securesms.ui.theme.h8 +import org.thoughtcrime.securesms.ui.theme.small @Composable internal fun EmptyView(newAccount: Boolean) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/home/SeedReminder.kt b/app/src/main/java/org/thoughtcrime/securesms/home/SeedReminder.kt index 69595136d1..ae15503005 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/home/SeedReminder.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/home/SeedReminder.kt @@ -18,16 +18,16 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider import org.thoughtcrime.securesms.ui.SessionShieldIcon -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.SlimPrimaryOutlineButton import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.h8 -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.h8 +import org.thoughtcrime.securesms.ui.theme.small @Composable internal fun SeedReminder(startRecoveryPasswordActivity: () -> Unit) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/OnboardingBackPressAlertDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/OnboardingBackPressAlertDialog.kt index abf9396bec..288968b87e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/OnboardingBackPressAlertDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/OnboardingBackPressAlertDialog.kt @@ -6,7 +6,7 @@ import network.loki.messenger.R import org.thoughtcrime.securesms.ui.AlertDialog import org.thoughtcrime.securesms.ui.DialogButtonModel import org.thoughtcrime.securesms.ui.GetString -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalColors @Composable fun OnboardingBackPressAlertDialog( diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt index d544de2f9c..af0b61451f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/landing/Landing.kt @@ -39,17 +39,17 @@ import network.loki.messenger.R import org.thoughtcrime.securesms.ui.AlertDialog import org.thoughtcrime.securesms.ui.DialogButtonModel import org.thoughtcrime.securesms.ui.GetString -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.BorderlessHtmlButton import org.thoughtcrime.securesms.ui.components.PrimaryFillButton import org.thoughtcrime.securesms.ui.components.PrimaryOutlineButton import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.h4 -import org.thoughtcrime.securesms.ui.large +import org.thoughtcrime.securesms.ui.theme.h4 +import org.thoughtcrime.securesms.ui.theme.large import kotlin.time.Duration.Companion.milliseconds @Preview diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccount.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccount.kt index 5fe7b64fce..bcefdc99bf 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccount.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccount.kt @@ -24,13 +24,13 @@ import androidx.compose.ui.tooling.preview.Preview import kotlinx.coroutines.flow.Flow import network.loki.messenger.R import org.thoughtcrime.securesms.onboarding.ui.ContinuePrimaryOutlineButton -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.base +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.base import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField import org.thoughtcrime.securesms.ui.components.SessionTabRow -import org.thoughtcrime.securesms.ui.h4 +import org.thoughtcrime.securesms.ui.theme.h4 private val TITLES = listOf(R.string.sessionRecoveryPassword, R.string.qrScan) diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loading/Loading.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loading/Loading.kt index 6c7c639a9a..b695f72457 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loading/Loading.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loading/Loading.kt @@ -13,11 +13,11 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalDimensions import org.thoughtcrime.securesms.ui.ProgressArc -import org.thoughtcrime.securesms.ui.base +import org.thoughtcrime.securesms.ui.theme.base import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.h7 +import org.thoughtcrime.securesms.ui.theme.h7 @Composable internal fun LoadingScreen(state: State) { diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt index c022e40652..4011470a14 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotifications.kt @@ -22,19 +22,19 @@ import network.loki.messenger.R import org.thoughtcrime.securesms.onboarding.OnboardingBackPressAlertDialog import org.thoughtcrime.securesms.onboarding.messagenotifications.MessageNotificationsViewModel.UiState import org.thoughtcrime.securesms.onboarding.ui.ContinuePrimaryOutlineButton -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.CircularProgressIndicator import org.thoughtcrime.securesms.ui.components.RadioButton import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.h4 -import org.thoughtcrime.securesms.ui.h8 -import org.thoughtcrime.securesms.ui.h9 -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.h4 +import org.thoughtcrime.securesms.ui.theme.h8 +import org.thoughtcrime.securesms.ui.theme.h9 +import org.thoughtcrime.securesms.ui.theme.small @Composable internal fun MessageNotificationsScreen( diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayName.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayName.kt index 0a3a50370a..f0d6cb2f89 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayName.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayName.kt @@ -17,11 +17,11 @@ import androidx.compose.ui.tooling.preview.Preview import network.loki.messenger.R import org.thoughtcrime.securesms.onboarding.OnboardingBackPressAlertDialog import org.thoughtcrime.securesms.onboarding.ui.ContinuePrimaryOutlineButton -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.base +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.base import org.thoughtcrime.securesms.ui.components.SessionOutlinedTextField -import org.thoughtcrime.securesms.ui.h4 +import org.thoughtcrime.securesms.ui.theme.h4 @Preview @Composable diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/ui/ContinueButton.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/ui/ContinueButton.kt index d48b5f56ab..0076fe5292 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/ui/ContinueButton.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/ui/ContinueButton.kt @@ -6,7 +6,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalDimensions import org.thoughtcrime.securesms.ui.components.PrimaryOutlineButton import org.thoughtcrime.securesms.ui.contentDescription diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/QRCodeActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/QRCodeActivity.kt index 092d1baf46..04d3a281a4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/QRCodeActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/QRCodeActivity.kt @@ -25,14 +25,14 @@ import org.session.libsignal.utilities.PublicKeyValidation import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.conversation.v2.ConversationActivityV2 import org.thoughtcrime.securesms.database.threadDatabase -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.MaybeScanQrCode import org.thoughtcrime.securesms.ui.components.QrImage import org.thoughtcrime.securesms.ui.components.SessionTabRow import org.thoughtcrime.securesms.ui.contentDescription import org.thoughtcrime.securesms.ui.setComposeContent -import org.thoughtcrime.securesms.ui.small +import org.thoughtcrime.securesms.ui.theme.small import org.thoughtcrime.securesms.util.start private val TITLES = listOf(R.string.view, R.string.scan) diff --git a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt index abcc278aeb..8f4c6b0fd4 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/preferences/SettingsActivity.kt @@ -78,8 +78,8 @@ import org.thoughtcrime.securesms.ui.Cell import org.thoughtcrime.securesms.ui.Divider import org.thoughtcrime.securesms.ui.LargeItemButton import org.thoughtcrime.securesms.ui.LargeItemButtonWithDrawable -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.destructiveButtonColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.destructiveButtonColors import org.thoughtcrime.securesms.ui.components.PrimaryOutlineButton import org.thoughtcrime.securesms.ui.components.PrimaryOutlineCopyButton import org.thoughtcrime.securesms.ui.contentDescription diff --git a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt index 4b16bc7a03..5ea95c32e0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPassword.kt @@ -26,20 +26,20 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import network.loki.messenger.R import org.thoughtcrime.securesms.ui.CellWithPaddingAndMargin -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider import org.thoughtcrime.securesms.ui.SessionShieldIcon -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.components.QrImage import org.thoughtcrime.securesms.ui.components.SlimOutlineButton import org.thoughtcrime.securesms.ui.components.SlimOutlineCopyButton import org.thoughtcrime.securesms.ui.components.border import org.thoughtcrime.securesms.ui.contentDescription -import org.thoughtcrime.securesms.ui.extraSmallMonospace -import org.thoughtcrime.securesms.ui.h8 +import org.thoughtcrime.securesms.ui.theme.extraSmallMonospace +import org.thoughtcrime.securesms.ui.theme.h8 @Composable internal fun RecoveryPasswordScreen( diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt index 1dc90d49ce..bc3abcce5a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/AlertDialog.kt @@ -22,6 +22,11 @@ import androidx.compose.ui.graphics.takeOrElse import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextAlign import network.loki.messenger.R +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.h7 +import org.thoughtcrime.securesms.ui.theme.large +import org.thoughtcrime.securesms.ui.theme.largeBold class DialogButtonModel( val text: GetString, diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Carousel.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Carousel.kt index 0c346f82f5..b7b40b41b0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Carousel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Carousel.kt @@ -37,6 +37,8 @@ import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import kotlinx.coroutines.launch import network.loki.messenger.R +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.pillShape import kotlin.math.absoluteValue import kotlin.math.sign diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt index 526a5ae7c7..9079c4c224 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Components.kt @@ -65,6 +65,17 @@ import org.session.libsession.utilities.runIf import org.thoughtcrime.securesms.components.ProfilePictureView import org.thoughtcrime.securesms.conversation.disappearingmessages.ui.OptionsCard import org.thoughtcrime.securesms.ui.components.SmallCircularProgressIndicator +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.divider +import org.thoughtcrime.securesms.ui.theme.extraSmall +import org.thoughtcrime.securesms.ui.theme.h2 +import org.thoughtcrime.securesms.ui.theme.h8 +import org.thoughtcrime.securesms.ui.theme.large +import org.thoughtcrime.securesms.ui.theme.radioButtonColors +import org.thoughtcrime.securesms.ui.theme.transparentButtonColors +import org.thoughtcrime.securesms.ui.theme.xl import kotlin.math.min import kotlin.math.roundToInt diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Util.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/Util.kt index d7aaf5430c..b49f9c6d60 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Util.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/Util.kt @@ -5,6 +5,7 @@ import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.ui.platform.ComposeView import androidx.fragment.app.Fragment +import org.thoughtcrime.securesms.ui.theme.SessionMaterialTheme fun Activity.setComposeContent(content: @Composable () -> Unit) { ComposeView(this) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/color/ColorsFromPreferences.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/color/ColorsFromPreferences.kt index 33b726d56d..fb387f89a5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/color/ColorsFromPreferences.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/color/ColorsFromPreferences.kt @@ -13,8 +13,15 @@ import org.session.libsession.utilities.TextSecurePreferences.Companion.PINK_ACC import org.session.libsession.utilities.TextSecurePreferences.Companion.PURPLE_ACCENT import org.session.libsession.utilities.TextSecurePreferences.Companion.RED_ACCENT import org.session.libsession.utilities.TextSecurePreferences.Companion.YELLOW_ACCENT -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LightDarkColors +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LightDarkColors +import org.thoughtcrime.securesms.ui.theme.primaryBlue +import org.thoughtcrime.securesms.ui.theme.primaryGreen +import org.thoughtcrime.securesms.ui.theme.primaryOrange +import org.thoughtcrime.securesms.ui.theme.primaryPink +import org.thoughtcrime.securesms.ui.theme.primaryPurple +import org.thoughtcrime.securesms.ui.theme.primaryRed +import org.thoughtcrime.securesms.ui.theme.primaryYellow /** * Retrieve the current [ThemeColors] from [TextSecurePreferences] and current system settings. @@ -25,12 +32,12 @@ private fun TextSecurePreferences.lightDarkColors() = LightDarkColors(isClassic( private fun TextSecurePreferences.isLight(): Boolean = getThemeStyle() in setOf(CLASSIC_LIGHT, OCEAN_LIGHT) private fun TextSecurePreferences.isClassic(): Boolean = getThemeStyle() in setOf(CLASSIC_DARK, CLASSIC_LIGHT) private fun TextSecurePreferences.primaryColor(): Color = when(getSelectedAccentColor()) { - GREEN_ACCENT -> org.thoughtcrime.securesms.ui.primaryGreen - BLUE_ACCENT -> org.thoughtcrime.securesms.ui.primaryBlue - PURPLE_ACCENT -> org.thoughtcrime.securesms.ui.primaryPurple - PINK_ACCENT -> org.thoughtcrime.securesms.ui.primaryPink - RED_ACCENT -> org.thoughtcrime.securesms.ui.primaryRed - ORANGE_ACCENT -> org.thoughtcrime.securesms.ui.primaryOrange - YELLOW_ACCENT -> org.thoughtcrime.securesms.ui.primaryYellow + GREEN_ACCENT -> primaryGreen + BLUE_ACCENT -> primaryBlue + PURPLE_ACCENT -> primaryPurple + PINK_ACCENT -> primaryPink + RED_ACCENT -> primaryRed + ORANGE_ACCENT -> primaryOrange + YELLOW_ACCENT -> primaryYellow else -> Color.Unspecified } diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/AppBar.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/AppBar.kt index 7c99df11f7..97392c34a0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/AppBar.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/AppBar.kt @@ -15,11 +15,11 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.h4 +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.h4 @Preview @Composable diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Border.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Border.kt index 17a559a363..f654142727 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Border.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Border.kt @@ -5,8 +5,8 @@ import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.SolidColor -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors @Composable fun Modifier.border() = this.border( diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt index de375a8a10..c034c38517 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Button.kt @@ -37,12 +37,12 @@ import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.filter import network.loki.messenger.R import org.thoughtcrime.securesms.ui.LaunchedEffectAsync -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.baseBold -import org.thoughtcrime.securesms.ui.buttonShape -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.baseBold +import org.thoughtcrime.securesms.ui.theme.buttonShape +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.contentDescription import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonStyle.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonStyle.kt index 3f566911db..7ccda6bcc0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonStyle.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonStyle.kt @@ -10,9 +10,9 @@ import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import org.thoughtcrime.securesms.ui.baseBold -import org.thoughtcrime.securesms.ui.extraSmall -import org.thoughtcrime.securesms.ui.extraSmallBold +import org.thoughtcrime.securesms.ui.theme.baseBold +import org.thoughtcrime.securesms.ui.theme.extraSmall +import org.thoughtcrime.securesms.ui.theme.extraSmallBold interface ButtonStyle { @OptIn(ExperimentalMaterialApi::class) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonType.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonType.kt index 3445f57b01..b5a856b5bd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonType.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/ButtonType.kt @@ -7,8 +7,8 @@ import androidx.compose.material.ButtonDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors private val disabledBorder @Composable get() = BorderStroke( width = LocalDimensions.current.borderStroke, diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QR.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QR.kt index 8eb3bff778..7104d493b7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QR.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QR.kt @@ -56,10 +56,10 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.launch import network.loki.messenger.R import org.session.libsignal.utilities.Log -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.xl +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.xl import java.util.concurrent.Executors private const val TAG = "NewMessageFragment" diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt index 279304649c..74713fa5a8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/QrImage.kt @@ -32,8 +32,8 @@ import androidx.compose.ui.unit.dp import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.util.QRCodeUtilities @Composable diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/RadioButton.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/RadioButton.kt index 53dcab3e5f..0b526326a1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/RadioButton.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/RadioButton.kt @@ -25,9 +25,9 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.semantics.Role import androidx.compose.ui.unit.dp -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.transparentButtonColors +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.transparentButtonColors @Composable fun RadioButton( diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/SessionTabRow.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/SessionTabRow.kt index f34112ac8a..c2424076e1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/SessionTabRow.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/SessionTabRow.kt @@ -19,13 +19,13 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import kotlinx.coroutines.launch import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.ThemeColors -import org.thoughtcrime.securesms.ui.SessionColorsParameterProvider -import org.thoughtcrime.securesms.ui.divider -import org.thoughtcrime.securesms.ui.h8 +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.ThemeColors +import org.thoughtcrime.securesms.ui.theme.SessionColorsParameterProvider +import org.thoughtcrime.securesms.ui.theme.divider +import org.thoughtcrime.securesms.ui.theme.h8 private val TITLES = listOf(R.string.sessionRecoveryPassword, R.string.qrScan) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Text.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Text.kt index 09bf292ce0..5d406e6008 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/components/Text.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/components/Text.kt @@ -37,14 +37,14 @@ import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import network.loki.messenger.R -import org.thoughtcrime.securesms.ui.LocalDimensions -import org.thoughtcrime.securesms.ui.PreviewTheme -import org.thoughtcrime.securesms.ui.base -import org.thoughtcrime.securesms.ui.baseBold -import org.thoughtcrime.securesms.ui.LocalColors -import org.thoughtcrime.securesms.ui.borders -import org.thoughtcrime.securesms.ui.text -import org.thoughtcrime.securesms.ui.textSecondary +import org.thoughtcrime.securesms.ui.theme.LocalDimensions +import org.thoughtcrime.securesms.ui.theme.PreviewTheme +import org.thoughtcrime.securesms.ui.theme.base +import org.thoughtcrime.securesms.ui.theme.baseBold +import org.thoughtcrime.securesms.ui.theme.LocalColors +import org.thoughtcrime.securesms.ui.theme.borders +import org.thoughtcrime.securesms.ui.theme.text +import org.thoughtcrime.securesms.ui.theme.textSecondary import org.thoughtcrime.securesms.ui.contentDescription @Preview diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Colors.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Colors.kt similarity index 62% rename from app/src/main/java/org/thoughtcrime/securesms/ui/Colors.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/theme/Colors.kt index 995dce0857..0b630ab233 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Colors.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Colors.kt @@ -1,24 +1,6 @@ -package org.thoughtcrime.securesms.ui +package org.thoughtcrime.securesms.ui.theme -import androidx.compose.foundation.background -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.text.selection.TextSelectionColors -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.MaterialTheme -import androidx.compose.material.RadioButtonDefaults -import androidx.compose.material.TabRowDefaults -import androidx.compose.material.Text -import androidx.compose.material.TextFieldDefaults -import androidx.compose.material.primarySurface -import androidx.compose.runtime.Composable -import androidx.compose.runtime.staticCompositionLocalOf -import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.takeOrElse -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.tooling.preview.PreviewParameter val classicDark0 = Color.Black val classicDark1 = Color(0xff1B1B1B) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Dimensions.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt similarity index 95% rename from app/src/main/java/org/thoughtcrime/securesms/ui/Dimensions.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt index 0a04880e8a..944b62ae03 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Dimensions.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Dimensions.kt @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.ui +package org.thoughtcrime.securesms.ui.theme import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.unit.Dp diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/SessionTypography.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/SessionTypography.kt similarity index 97% rename from app/src/main/java/org/thoughtcrime/securesms/ui/SessionTypography.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/theme/SessionTypography.kt index 426c6f8dc4..433b650f61 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/SessionTypography.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/SessionTypography.kt @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.ui +package org.thoughtcrime.securesms.ui.theme import androidx.compose.material.Typography import androidx.compose.ui.text.TextStyle diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/ThemeColors.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColors.kt similarity index 98% rename from app/src/main/java/org/thoughtcrime/securesms/ui/ThemeColors.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColors.kt index 0ef29b574a..3fa582af4f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/ThemeColors.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/ThemeColors.kt @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.ui +package org.thoughtcrime.securesms.ui.theme import androidx.compose.foundation.background import androidx.compose.foundation.isSystemInDarkTheme @@ -10,7 +10,6 @@ import androidx.compose.material.MaterialTheme import androidx.compose.material.RadioButtonDefaults import androidx.compose.material.TabRowDefaults import androidx.compose.material.Text -import androidx.compose.material.TextFieldDefaults import androidx.compose.material.primarySurface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt similarity index 97% rename from app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt rename to app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt index 87c4e96f99..961c89fe4d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ui/Themes.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/ui/theme/Themes.kt @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.ui +package org.thoughtcrime.securesms.ui.theme import android.content.Context import androidx.compose.foundation.background @@ -79,6 +79,7 @@ fun PreviewTheme( } } +// used for previews class SessionColorsParameterProvider : PreviewParameterProvider<ThemeColors> { override val values = sequenceOf(ClassicDark(), ClassicLight(), OceanDark(), OceanLight()) }