Open-source Android PDF and document toolkit with PDF tools, Office viewing, XLSX editing, scanning, and image editing. Built with Kotlin and Jetpack Compose.
Rust androiddocument-scannerdocximage-editorjetpack-composekotlinliquid-glassofflineopen-sourcepdfpdf-compressorpdf-editorpdf-mergerpdf-readerpdf-splitterpdf-toolspdf-viewerpptxspreadsheet-editorxlsx
xlsx: plain share button (not ShareMorph), fix grey sheet-tab dock background
Chethan616982262658302
diff --git a/app/src/main/java/com/chethan616/clearpdf/ui/screen/SpreadsheetViewerScreen.kt b/app/src/main/java/com/chethan616/clearpdf/ui/screen/SpreadsheetViewerScreen.ktindex 5863934..40a6fe8 100644--- a/app/src/main/java/com/chethan616/clearpdf/ui/screen/SpreadsheetViewerScreen.kt+++ b/app/src/main/java/com/chethan616/clearpdf/ui/screen/SpreadsheetViewerScreen.kt@@ -81,6 +81,7 @@ import androidx.compose.material.icons.rounded.FormatItalicimport androidx.compose.material.icons.rounded.FormatStrikethroughimport androidx.compose.material.icons.rounded.FormatUnderlinedimport androidx.compose.material.icons.rounded.Numbers+import androidx.compose.material.icons.rounded.IosShareimport androidx.compose.material.icons.rounded.PictureAsPdfimport androidx.compose.material.icons.rounded.SaveAsimport androidx.compose.material.icons.rounded.Search@@ -168,6 +169,7 @@ import com.chethan616.clearpdf.utils.xlsx.ValidationKindimport com.chethan616.clearpdf.utils.xlsx.XlsxColorsimport com.chethan616.clearpdf.utils.xlsx.XlsxPainterimport com.chethan616.clearpdf.utils.xlsx.XlsxRefs+import com.kyant.backdrop.Backdropimport com.kyant.backdrop.backdrops.LayerBackdropimport com.kyant.shapes.Capsuleimport com.kyant.shapes.RoundedRectangle@@ -658,25 +660,33 @@ fun SpreadsheetViewerScreen(wb = wb!!,indices = visibleSheets,selected = idx,- backdrop = backdrop,+ // The *live* backdrop (wallpaper + the grid actually on screen), not the+ // wallpaper-only one: this dock floats outside the captured content layer, so+ // sampling plain `backdrop` gave it nothing to refract but the flat grey/near-+ // black fallback fill whenever the wallpaper is off (the app default) -- a dock+ // that read as a dull grey slab instead of glass over the sheet.+ backdrop = screenBackdrop.glass,text = text,accent = accent,onSelect = { i -> if (editing) commitDraft(); sheetIndex = i })}- // Share / export (reading mode): tap = open as PDF, long-press + swipe up = share.+ // A single plain share button, not the reader's hold-and-swipe ShareMorph gesture — the+ // sheet already has an explicit "export as PDF" entry point elsewhere in its tools, so this+ // one control only needs to do the one thing its icon says. Long-press keeps the PDF export+ // reachable (same as the back circle's long-press-for-library convention) instead of losing+ // it outright.if (sheet != null && !showSearch && !editMode) {- ShareMorphButton(- backdrop = backdrop,- glass = chromeGlass,- fg = text,- onOpen = { viewModel.exportToPdf(context) { u -> u?.let(onOpenPdf) } },- onShare = { viewModel.shareableUri(context) { u -> u?.let { shareFile(context, it) } } },- idleIcon = Icons.Rounded.PictureAsPdf,- idleContentDesc = stringResource(R.string.sheet_export_pdf),- modifier = Modifier.align(Alignment.BottomEnd).navigationBarsPadding().padding(end = 12.dp)- )+ LiquidIconButton(+ onClick = { viewModel.shareableUri(context) { u -> u?.let { shareFile(context, it) } } },+ onLongClick = { viewModel.exportToPdf(context) { u -> u?.let(onOpenPdf) } },+ onLongClickLabel = stringResource(R.string.sheet_export_pdf),+ backdrop = screenBackdrop.glass,+ modifier = Modifier.align(Alignment.BottomEnd).navigationBarsPadding().padding(end = 12.dp).size(52.dp)+ ) {+ Icon(Icons.Rounded.IosShare, stringResource(R.string.viewer_share_document), Modifier.size(20.dp), text)+ }}AnimatedVisibility(@@ -912,7 +922,7 @@ private fun SheetTabs(wb: com.chethan616.clearpdf.utils.xlsx.XlsxWorkbook,indices: List<Int>,selected: Int,- backdrop: LayerBackdrop,+ backdrop: Backdrop,text: Color,accent: Color,onSelect: (Int) -> Unit