1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 00:43:00 +02:00
This commit is contained in:
2023-02-18 13:08:08 +01:00
parent ba255ddb00
commit 8dcf101a9c
4 changed files with 9 additions and 9 deletions

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)
}