mirror of
https://github.com/amir1376/ab-download-manager.git
synced 2025-02-20 11:43:24 +08:00
resize settings page and place it to center
This commit is contained in:
parent
bc7cb86643
commit
26a35aa1b7
@ -9,28 +9,34 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.WindowPosition
|
||||
import androidx.compose.ui.window.rememberWindowState
|
||||
|
||||
@Composable
|
||||
fun SettingWindow(
|
||||
settingsComponent: SettingsComponent,
|
||||
onRequestCloseWindow:()->Unit,
|
||||
){
|
||||
val state= rememberWindowState()
|
||||
onRequestCloseWindow: () -> Unit,
|
||||
) {
|
||||
val state = rememberWindowState(
|
||||
size = DpSize(width = 800.dp, height = 400.dp),
|
||||
position = WindowPosition.Aligned(Alignment.Center),
|
||||
)
|
||||
CustomWindow(state, {
|
||||
onRequestCloseWindow()
|
||||
}) {
|
||||
HandleEffects(settingsComponent){
|
||||
when(it){
|
||||
HandleEffects(settingsComponent) {
|
||||
when (it) {
|
||||
SettingPageEffects.BringToFront -> {
|
||||
state.isMinimized=false
|
||||
state.isMinimized = false
|
||||
window.toFront()
|
||||
}
|
||||
}
|
||||
}
|
||||
// Spacer(Modifier.fillMaxWidth().height(1.dp).background(myColors.surface))
|
||||
SettingsPage(settingsComponent,onRequestCloseWindow)
|
||||
SettingsPage(settingsComponent, onRequestCloseWindow)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user