Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ ColorPickerDialog(
)
```

<img src="docs/images/dialog.png" alt="Color picker dialog" width="360">
![Color picker dialog](docs/images/dialog.png)

Switching space redraws the color without converting it. Confirming returns exactly the initial
value if nothing was edited, or if the original half of the swatch was pressed to restore it, so an
Expand Down
Binary file modified docs/images/dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ ColorPickerDialog(
)
```

<img src="images/dialog.png" alt="Color picker dialog" width="360">
![Color picker dialog](images/dialog.png)

Switching space redraws the color without converting it. Confirming returns exactly the initial
value if nothing was edited, or if the original half of the swatch was pressed to restore it, so an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -299,17 +300,18 @@ fun OkhsvPlanePreview() = Frame {
ChannelSlider(state, Okhsv.H)
}

// A phone's dialog window keeps the dialog clear of the screen's edges. The preview's window runs edge to edge, so
// the margin is given here.
// The dialog at a phone's width, a 440 dp screen less the margins its dialog window keeps, on a canvas in the landscape
// screenshot's proportions, so the README shows the two at one size. Left to itself on a canvas this wide, the dialog
// would take Material's widest, 560 dp.
@PreviewTest
@Preview(name = "Dialog", widthDp = 440, heightDp = 960)
@Preview(name = "Dialog", widthDp = 2048, heightDp = 960)
@Composable
fun DialogPreview() = Frame {
ColorPickerDialog(
initialValue = FuchsiaRose.withAlpha(0.8),
onValueSelected = {},
onDismissRequest = {},
modifier = Modifier.padding(horizontal = 24.dp),
modifier = Modifier.width(392.dp),
initialSpace = Okhsl,
)
}
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading