@@ -149,27 +149,51 @@ fun DuplicatesScreen(
149149 TopAppBar (
150150 title = { Text (title) },
151151 navigationIcon = {
152- IconButton (onClick = onNavigateUp) {
153- Icon (Icons .AutoMirrored .Filled .ArrowBack , contentDescription = " Navigate back" )
152+ TooltipBox (
153+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
154+ tooltip = { PlainTooltip { Text (" Navigate back" ) } },
155+ state = rememberTooltipState()
156+ ) {
157+ IconButton (onClick = onNavigateUp) {
158+ Icon (Icons .AutoMirrored .Filled .ArrowBack , contentDescription = " Navigate back" )
159+ }
154160 }
155161 },
156162 actions = {
157163 if (uiState.scanState == ScanState .Complete ) {
158- IconButton (onClick = viewModel::resetToIdle) {
159- Icon (Icons .Outlined .Cached , contentDescription = " New Scan" )
164+ TooltipBox (
165+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
166+ tooltip = { PlainTooltip { Text (" New Scan" ) } },
167+ state = rememberTooltipState()
168+ ) {
169+ IconButton (onClick = viewModel::resetToIdle) {
170+ Icon (Icons .Outlined .Cached , contentDescription = " New Scan" )
171+ }
160172 }
161173 }
162174 if (uiState.resultViewMode == ResultViewMode .GRID && uiState.scanState == ScanState .Complete ) {
163- IconButton (onClick = viewModel::cycleGridViewZoom) {
164- Icon (Icons .Outlined .ZoomIn , contentDescription = " Change grid columns" )
175+ TooltipBox (
176+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
177+ tooltip = { PlainTooltip { Text (" Change grid columns" ) } },
178+ state = rememberTooltipState()
179+ ) {
180+ IconButton (onClick = viewModel::cycleGridViewZoom) {
181+ Icon (Icons .Outlined .ZoomIn , contentDescription = " Change grid columns" )
182+ }
165183 }
166184 }
167185 if (uiState.scanState == ScanState .Complete && uiState.resultGroups.isNotEmpty()) {
168- IconButton (onClick = viewModel::toggleResultViewMode) {
169- Icon (
170- imageVector = if (uiState.resultViewMode == ResultViewMode .LIST ) Icons .Outlined .ViewModule else Icons .AutoMirrored .Outlined .ViewList ,
171- contentDescription = " Toggle View Mode"
172- )
186+ TooltipBox (
187+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
188+ tooltip = { PlainTooltip { Text (" Toggle View Mode" ) } },
189+ state = rememberTooltipState()
190+ ) {
191+ IconButton (onClick = viewModel::toggleResultViewMode) {
192+ Icon (
193+ imageVector = if (uiState.resultViewMode == ResultViewMode .LIST ) Icons .Outlined .ViewModule else Icons .AutoMirrored .Outlined .ViewList ,
194+ contentDescription = " Toggle View Mode"
195+ )
196+ }
173197 }
174198 }
175199 }
@@ -271,19 +295,37 @@ fun GroupDetailsScreen(
271295 TopAppBar (
272296 title = { Text (if (group != null ) " View Group (${group.items.size} items)" else " View Group" ) },
273297 navigationIcon = {
274- IconButton (onClick = onNavigateUp) {
275- Icon (Icons .AutoMirrored .Filled .ArrowBack , contentDescription = " Back" )
298+ TooltipBox (
299+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
300+ tooltip = { PlainTooltip { Text (" Back" ) } },
301+ state = rememberTooltipState()
302+ ) {
303+ IconButton (onClick = onNavigateUp) {
304+ Icon (Icons .AutoMirrored .Filled .ArrowBack , contentDescription = " Back" )
305+ }
276306 }
277307 },
278308 actions = {
279309 if (group != null ) {
280- IconButton (onClick = viewModel::cycleDetailViewZoom) {
281- Icon (Icons .Outlined .ZoomIn , contentDescription = " Change layout columns" )
310+ TooltipBox (
311+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
312+ tooltip = { PlainTooltip { Text (" Change layout columns" ) } },
313+ state = rememberTooltipState()
314+ ) {
315+ IconButton (onClick = viewModel::cycleDetailViewZoom) {
316+ Icon (Icons .Outlined .ZoomIn , contentDescription = " Change layout columns" )
317+ }
282318 }
283319 var showMenu by remember { mutableStateOf(false ) }
284320 Box {
285- IconButton (onClick = { showMenu = true }) {
286- Icon (Icons .Default .MoreVert , contentDescription = " More options" )
321+ TooltipBox (
322+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
323+ tooltip = { PlainTooltip { Text (" More options" ) } },
324+ state = rememberTooltipState()
325+ ) {
326+ IconButton (onClick = { showMenu = true }) {
327+ Icon (Icons .Default .MoreVert , contentDescription = " More options" )
328+ }
287329 }
288330 DropdownMenu (
289331 expanded = showMenu,
@@ -629,6 +671,7 @@ private fun ResultsView(
629671 }
630672}
631673
674+ @OptIn(ExperimentalMaterial3Api ::class )
632675@Composable
633676private fun StaleResultsWarningCard (
634677 timestamp : Long ,
@@ -676,15 +719,21 @@ private fun StaleResultsWarningCard(
676719 )
677720 }
678721 }
679- IconButton (
680- onClick = onDismiss,
681- modifier = Modifier .align(Alignment .TopEnd )
722+ TooltipBox (
723+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
724+ tooltip = { PlainTooltip { Text (" Dismiss warning" ) } },
725+ state = rememberTooltipState()
682726 ) {
683- Icon (
684- imageVector = Icons .Default .Close ,
685- contentDescription = " Dismiss warning" ,
686- tint = MaterialTheme .colorScheme.onTertiaryContainer
687- )
727+ IconButton (
728+ onClick = onDismiss,
729+ modifier = Modifier .align(Alignment .TopEnd )
730+ ) {
731+ Icon (
732+ imageVector = Icons .Default .Close ,
733+ contentDescription = " Dismiss warning" ,
734+ tint = MaterialTheme .colorScheme.onTertiaryContainer
735+ )
736+ }
688737 }
689738 }
690739 TextButton (
@@ -700,6 +749,7 @@ private fun StaleResultsWarningCard(
700749}
701750
702751
752+ @OptIn(ExperimentalMaterial3Api ::class )
703753@Composable
704754private fun UnscannableFilesSummaryCard (
705755 count : Int ,
@@ -739,15 +789,21 @@ private fun UnscannableFilesSummaryCard(
739789 )
740790 }
741791 }
742- IconButton (
743- onClick = onDismiss,
744- modifier = Modifier .align(Alignment .TopEnd )
792+ TooltipBox (
793+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
794+ tooltip = { PlainTooltip { Text (" Dismiss warning" ) } },
795+ state = rememberTooltipState()
745796 ) {
746- Icon (
747- imageVector = Icons .Default .Close ,
748- contentDescription = " Dismiss warning" ,
749- tint = MaterialTheme .colorScheme.onTertiaryContainer
750- )
797+ IconButton (
798+ onClick = onDismiss,
799+ modifier = Modifier .align(Alignment .TopEnd )
800+ ) {
801+ Icon (
802+ imageVector = Icons .Default .Close ,
803+ contentDescription = " Dismiss warning" ,
804+ tint = MaterialTheme .colorScheme.onTertiaryContainer
805+ )
806+ }
751807 }
752808 }
753809 }
@@ -1148,6 +1204,7 @@ private fun GridGroupCard(
11481204 }
11491205}
11501206
1207+ @OptIn(ExperimentalMaterial3Api ::class )
11511208@Composable
11521209private fun DuplicateGroupCard (
11531210 group : DuplicateGroup ,
@@ -1181,8 +1238,14 @@ private fun DuplicateGroupCard(
11811238 )
11821239 }
11831240 Box (modifier = Modifier .align(Alignment .TopEnd )) {
1184- IconButton (onClick = { showMenu = true }) {
1185- Icon (Icons .Default .MoreVert , contentDescription = " More options" )
1241+ TooltipBox (
1242+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
1243+ tooltip = { PlainTooltip { Text (" More options" ) } },
1244+ state = rememberTooltipState()
1245+ ) {
1246+ IconButton (onClick = { showMenu = true }) {
1247+ Icon (Icons .Default .MoreVert , contentDescription = " More options" )
1248+ }
11861249 }
11871250 DropdownMenu (
11881251 expanded = showMenu,
@@ -1237,6 +1300,7 @@ private fun DuplicateGroupCard(
12371300 }
12381301}
12391302
1303+ @OptIn(ExperimentalMaterial3Api ::class )
12401304@Composable
12411305private fun SimilarMediaGroupCard (
12421306 group : SimilarGroup ,
@@ -1271,8 +1335,14 @@ private fun SimilarMediaGroupCard(
12711335 )
12721336 }
12731337 Box (modifier = Modifier .align(Alignment .TopEnd )) {
1274- IconButton (onClick = { showMenu = true }) {
1275- Icon (Icons .Default .MoreVert , contentDescription = " More options" )
1338+ TooltipBox (
1339+ positionProvider = TooltipDefaults .rememberPlainTooltipPositionProvider(),
1340+ tooltip = { PlainTooltip { Text (" More options" ) } },
1341+ state = rememberTooltipState()
1342+ ) {
1343+ IconButton (onClick = { showMenu = true }) {
1344+ Icon (Icons .Default .MoreVert , contentDescription = " More options" )
1345+ }
12761346 }
12771347 DropdownMenu (
12781348 expanded = showMenu,
0 commit comments