Tabs now use InstantTooltip

This commit is contained in:
Abdelilah El Aissaoui 2024-01-12 15:14:02 +01:00
parent 9b75e0d804
commit 8a65a56f75
No known key found for this signature in database
GPG Key ID: 7587FC860F594869
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ import com.jetpackduba.gitnuro.theme.isDark
@Composable @Composable
fun InstantTooltip( fun InstantTooltip(
text: String, text: String?,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
position: InstantTooltipPosition = InstantTooltipPosition.BOTTOM, position: InstantTooltipPosition = InstantTooltipPosition.BOTTOM,
content: @Composable () -> Unit, content: @Composable () -> Unit,
@ -47,7 +47,7 @@ fun InstantTooltip(
content() content()
} }
if (isHovered && coordinates != null) { if (isHovered && coordinates != null && text != null) {
Popup( Popup(
properties = PopupProperties( properties = PopupProperties(
focusable = false, focusable = false,

View File

@ -118,7 +118,7 @@ fun RepositoriesTabPanel(
key = { _, tab -> tab.tabViewModel } key = { _, tab -> tab.tabViewModel }
) { index, tab -> ) { index, tab ->
HorizontalDraggableItem(dragDropState, index) { _ -> HorizontalDraggableItem(dragDropState, index) { _ ->
Tooltip(tab.path) { InstantTooltip(tab.path) {
Tab( Tab(
modifier = Modifier, modifier = Modifier,
title = tab.tabName, title = tab.tabName,