diff --git a/Makefile b/Makefile index 55d081a0..8518d0f7 100644 --- a/Makefile +++ b/Makefile @@ -28,5 +28,8 @@ precommit: lint test cli: poetry run tkdesigner ${FIGMA_PROJECT_URL} ${FIGMA_TOKEN} -f +cli.build.test: + poetry run tkdesigner https://www.figma.com/file/WVLnulVsI177tvnxSdqOUZ/Untitled ${FIGMA_TOKEN} -f + gui: poetry run python gui/gui.py \ No newline at end of file diff --git a/tkdesigner/figma/custom_elements.py b/tkdesigner/figma/custom_elements.py index 652fa234..1a21d2cb 100644 --- a/tkdesigner/figma/custom_elements.py +++ b/tkdesigner/figma/custom_elements.py @@ -11,6 +11,7 @@ def __init__(self, node, frame, image_path, *, id_): super().__init__(node, frame) self.image_path = image_path self.id_ = id_ + self.frame = frame def to_code(self): return f""" @@ -20,6 +21,7 @@ def to_code(self): image=button_image_{self.id_}, borderwidth=0, highlightthickness=0, + activebackground="{self.frame.color()}", command=lambda: print("button_{self.id_} clicked"), relief="flat" )