This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2023-02-18 13:08:08 +01:00
1 parent ba255ddb00
commit 8dcf101a9c
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -1139,7 +1139,7 @@ try_colour <- function(..., before, after, collapse = " ") {
}
is_dark <- function() {
if (is.null(AMR_env$is_dark_theme)) {
!has_colour() || AMR_env$is_dark_theme <- tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) FALSE)
AMR_env$is_dark_theme <- !has_colour() || tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) FALSE)
}
isTRUE(AMR_env$is_dark_theme)
}