Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use larger icon size for Window's IconImage #890

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ internal fun Dialog.setUndecoratedSafely(value: Boolean) {
}
}

// In fact, this size doesn't affect anything on Windows/Linux, and isn't used by macOS (macOS
// doesn't have separate Window icons). We specify it to support Painter's with
// Unspecified intrinsicSize
private val iconSize = Size(32f, 32f)
// We specify this to support Painter's with unspecified intrinsicSize
private val iconSize = Size(192f, 192f)

internal fun Window.setIcon(painter: Painter?) {
setIconImage(painter?.toAwtImage(density, layoutDirectionFor(this), iconSize))
Expand Down