mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Ensure that alpha values in colors aren't passed to html.
html color tags don't like them.
This commit is contained in:
parent
3d1812aacd
commit
97a317b50c
@ -72,7 +72,12 @@
|
||||
(GncOption-get-scm-value option))
|
||||
|
||||
(define-public (gnc:color-option->html opt)
|
||||
(format #f "#~a" (GncOption-get-scm-value opt)))
|
||||
;; HTML doesn't like alpha values.
|
||||
(let* ((color (GncOption-get-scm-value opt))
|
||||
(html-color (if (> (string-length color) 6)
|
||||
(substring color 0 6)
|
||||
color)))
|
||||
(format #f "#~a" html-color)))
|
||||
|
||||
(define-public (gnc:color-option->hex-string opt)
|
||||
(format #f "~a" (GncOption-get-scm-value opt)))
|
||||
|
Loading…
Reference in New Issue
Block a user