mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-01 09:42:23 +00:00
Merge pull request #6953 from element-hq/feature/bma/cropIcon
Replace "Edit" button with Crop icon.
This commit is contained in:
+11
-5
@@ -37,6 +37,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||
import io.element.android.features.messages.impl.R
|
||||
import io.element.android.features.messages.impl.attachments.Attachment
|
||||
import io.element.android.features.messages.impl.attachments.preview.error.sendAttachmentError
|
||||
@@ -57,11 +58,12 @@ import io.element.android.libraries.designsystem.modifiers.niceClickable
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.IconButton
|
||||
import io.element.android.libraries.designsystem.theme.components.ListItem
|
||||
import io.element.android.libraries.designsystem.theme.components.Scaffold
|
||||
import io.element.android.libraries.designsystem.theme.components.Switch
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.designsystem.theme.components.TextButton
|
||||
import io.element.android.libraries.designsystem.theme.components.TopAppBar
|
||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||
import io.element.android.libraries.mediaviewer.api.local.LocalMedia
|
||||
@@ -163,10 +165,14 @@ fun AttachmentsPreviewView(
|
||||
},
|
||||
actions = {
|
||||
if (state.canEditImage && canShowEditAction) {
|
||||
TextButton(
|
||||
stringResource(CommonStrings.action_edit),
|
||||
onClick = ::postOpenImageEditor
|
||||
)
|
||||
IconButton(
|
||||
onClick = ::postOpenImageEditor,
|
||||
) {
|
||||
Icon(
|
||||
imageVector = CompoundIcons.Crop(),
|
||||
contentDescription = stringResource(CommonStrings.action_edit),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -4,9 +4,10 @@
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M6,2a1,1 0,0 1,1 1v13a1,1 0,0 0,1 1h13a1,1 0,1 1,0 2h-2v2a1,1 0,1 1,-2 0v-2H8a3,3 0,0 1,-3 -3V7H3a1,1 0,0 1,0 -2h2V3a1,1 0,0 1,1 -1"
|
||||
android:fillColor="#FF000000"/>
|
||||
android:pathData="M6,4a1,1 0,0 0,-1 1v2H3a1,1 0,1 0,0 2h2v8a3,3 0,0 0,3 3h8v2a1,1 0,0 0,2 0v-2h2a1,1 0,1 0,0 -2h-2v-8a3,3 0,0 0,-3 -3H7V5a1,1 0,0 0,-1 -1m9,5a1,1 0,0 1,1 1v8H8a1,1 0,0 1,-1 -1V9z"
|
||||
android:fillColor="#FF000000"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M16,5a3,3 0,0 1,3 3v7h-2V8a1,1 0,0 0,-1 -1H9V5z"
|
||||
android:pathData="M15.707,0.293a1,1 0,0 0,-1.414 0l-2,2a1,1 0,0 0,0 1.414l2,2a1,1 0,1 0,1.414 -1.414l-0.275,-0.276A6,6 0,0 1,21 10a1,1 0,1 0,2 0,8 8,0 0,0 -7.596,-7.99l0.303,-0.303a1,1 0,0 0,0 -1.414"
|
||||
android:fillColor="#FF000000"/>
|
||||
</vector>
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user