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
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# ggplot2 (development version)

### Bug fixes

* Fixed regression where `draw_key_rect()` stopped using `fill` colours
(@mitchelloharawild, #6609).

# ggplot2 4.0.0

## User facing
Expand Down
2 changes: 1 addition & 1 deletion R/legend-draw.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ draw_key_abline <- function(data, params, size) {
#' @export
#' @rdname draw_key
draw_key_rect <- function(data, params, size) {
colour <- if (is.na(data$fill %||% NA)) data$colour
colour <- if (is.na(data$fill %||% NA)) data$colour else data$fill
rectGrob(gp = gg_par(
col = NA,
fill = fill_alpha(colour %||% "grey20", data$alpha),
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/legend-draw/all-legend-keys.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading