mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 11:22:12 +00:00
Update: Replace TopBar's Material icons with Phosphor
This commit is contained in:
parent
b377067793
commit
bf19df717a
@ -9,9 +9,6 @@ import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.Settings
|
||||
import androidx.compose.material.icons.rounded.Sync
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Scaffold
|
||||
@ -35,6 +32,9 @@ import com.machiav3lli.fdroid.service.SyncService
|
||||
import com.machiav3lli.fdroid.ui.compose.components.ExpandableSearchAction
|
||||
import com.machiav3lli.fdroid.ui.compose.components.TopBar
|
||||
import com.machiav3lli.fdroid.ui.compose.components.TopBarAction
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.ArrowsClockwise
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.GearSix
|
||||
import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
|
||||
import com.machiav3lli.fdroid.ui.fragments.AppSheetX
|
||||
import com.machiav3lli.fdroid.ui.fragments.SortFilterSheet
|
||||
@ -125,13 +125,13 @@ class MainActivityX : AppCompatActivity() {
|
||||
}
|
||||
)
|
||||
TopBarAction(
|
||||
icon = Icons.Rounded.Sync,
|
||||
icon = Phosphor.ArrowsClockwise,
|
||||
description = stringResource(id = R.string.sync_repositories)
|
||||
) {
|
||||
syncConnection.binder?.sync(SyncService.SyncRequest.MANUAL)
|
||||
}
|
||||
TopBarAction(
|
||||
icon = Icons.Rounded.Settings,
|
||||
icon = Phosphor.GearSix,
|
||||
description = stringResource(id = R.string.settings)
|
||||
) {
|
||||
navController.navigate(NavItem.Prefs.destination)
|
||||
|
@ -8,9 +8,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.foundation.text.KeyboardActions
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.Close
|
||||
import androidx.compose.material.icons.rounded.Search
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@ -40,6 +37,9 @@ import androidx.compose.ui.text.TextRange
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import com.machiav3lli.fdroid.R
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.MagnifyingGlass
|
||||
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.X
|
||||
import com.machiav3lli.fdroid.ui.compose.utils.HorizontalExpandingVisibility
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@ -97,7 +97,7 @@ fun CollapsedSearchView(
|
||||
onExpanded: (Boolean) -> Unit
|
||||
) {
|
||||
TopBarAction(
|
||||
icon = Icons.Rounded.Search,
|
||||
icon = Phosphor.MagnifyingGlass,
|
||||
description = stringResource(id = R.string.search),
|
||||
onClick = { onExpanded(true) }
|
||||
)
|
||||
@ -152,7 +152,7 @@ fun ExpandedSearchView(
|
||||
keyboardActions = KeyboardActions(onDone = { focusManager.clearFocus() }),
|
||||
)
|
||||
TopBarAction(
|
||||
icon = Icons.Rounded.Close,
|
||||
icon = Phosphor.X,
|
||||
description = stringResource(id = R.string.cancel),
|
||||
onClick = {
|
||||
textFieldValue = TextFieldValue(text = "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user