mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +01:00 
			
		
		
		
	Make Compose overflow menu feel slightly more like XML version
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
package eu.kanade.presentation.components
 | 
			
		||||
 | 
			
		||||
import androidx.compose.foundation.layout.Column
 | 
			
		||||
import androidx.compose.foundation.layout.widthIn
 | 
			
		||||
import androidx.compose.material.icons.Icons
 | 
			
		||||
import androidx.compose.material.icons.filled.MoreVert
 | 
			
		||||
import androidx.compose.material3.DropdownMenu
 | 
			
		||||
@@ -14,9 +15,12 @@ import androidx.compose.runtime.getValue
 | 
			
		||||
import androidx.compose.runtime.mutableStateOf
 | 
			
		||||
import androidx.compose.runtime.remember
 | 
			
		||||
import androidx.compose.runtime.setValue
 | 
			
		||||
import androidx.compose.ui.Modifier
 | 
			
		||||
import androidx.compose.ui.graphics.vector.ImageVector
 | 
			
		||||
import androidx.compose.ui.res.stringResource
 | 
			
		||||
import androidx.compose.ui.text.font.FontWeight
 | 
			
		||||
import androidx.compose.ui.text.style.TextOverflow
 | 
			
		||||
import androidx.compose.ui.unit.dp
 | 
			
		||||
import eu.kanade.tachiyomi.R
 | 
			
		||||
 | 
			
		||||
@Composable
 | 
			
		||||
@@ -68,6 +72,7 @@ fun AppBarActions(
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        DropdownMenu(
 | 
			
		||||
            modifier = Modifier.widthIn(min = 200.dp),
 | 
			
		||||
            expanded = showMenu,
 | 
			
		||||
            onDismissRequest = { showMenu = false },
 | 
			
		||||
        ) {
 | 
			
		||||
@@ -77,15 +82,15 @@ fun AppBarActions(
 | 
			
		||||
                        it.onClick()
 | 
			
		||||
                        showMenu = false
 | 
			
		||||
                    },
 | 
			
		||||
                    text = { Text(it.title) },
 | 
			
		||||
                    text = { Text(it.title, fontWeight = FontWeight.Normal) },
 | 
			
		||||
                )
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
object AppBar {
 | 
			
		||||
    interface AppBarAction
 | 
			
		||||
sealed interface AppBar {
 | 
			
		||||
    sealed interface AppBarAction
 | 
			
		||||
 | 
			
		||||
    data class Action(
 | 
			
		||||
        val title: String,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user