From af8e0d6618f85fdc8543904aa1c2da4e0cdf9ce4 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 29 Dec 2023 08:56:44 -0300 Subject: [PATCH] [KiRi] Diff canvas background configurable --- kibot/out_kiri.py | 11 +++++++++++ kibot/resources/kiri/kiri.css | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/kibot/out_kiri.py b/kibot/out_kiri.py index 51ad3f2a..0d8f7ba1 100644 --- a/kibot/out_kiri.py +++ b/kibot/out_kiri.py @@ -61,12 +61,18 @@ class KiRiOptions(VariantOptions): """ *Selects the color theme. Only applies to KiCad 6. To use the KiCad 6 default colors select `_builtin_default`. Usually user colors are stored as `user`, but you can give it another name """ + self.background_color = "#FFFFFF" + """ Color used for the background of the diff canvas """ self.keep_generated = False """ *Avoid PCB and SCH images regeneration. Useful for incremental usage """ super().__init__() self._expand_id = 'diff' self._expand_ext = 'pdf' + def config(self, parent): + super().config(parent) + self.validate_colors(['background_color']) + def get_targets(self, out_dir): # TODO: Implement return [self._parent.expand_filename(out_dir, self.output)] @@ -185,6 +191,7 @@ class KiRiOptions(VariantOptions): for ln in src: ln_stripped = ln.strip() if ln_stripped.startswith('