Repository navigation
fix(textbox): apply lineOpacity to textbox borders - #669
Merged
Merged
Conversation
…-opacity # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 KiroCrew automated comment: PR created by KiroCrew on behalf of the maintainers. It will not be merged by KiroCrew.
Summary
A textbox border ignored
lineOpacity, so a translucent border came out fully opaque. Since #651,pptx_to_jsonreadslineOpacityfrom a textbox border, so a PPTX → JSON → PPTX round trip also lost it. The textbox builder now writes the border alpha with the same rule and helper as shapes.Changes
sdpm/sdpm/engine/builder/elements/textbox.py_set_line_opacitywhen0 <= lineOpacity < 1(same rule as shapes). No converter change.tests/test_element_roundtrip.pyTestTextboxBox.test_border_opacity_survives:lineOpacity: 0.5writes<a:alpha val="50000"/>and comes back as0.5; nolineOpacityorlineOpacity: 1writes no alpha.sdpm/references/guides/slide-json-elements.mdlineOpacityin the textbox section, next toline/lineWidth.CHANGELOG.md[Unreleased]→Fixedentry.Tests
AttributeError: noa:alphaunder the border colour) and passes with it.uv run ruff check sdpm/sdpm/engine/builder/elements/textbox.py tests/test_element_roundtrip.py→ All checks passeduv run pytest -q tests/test_element_roundtrip.py→ 121 passedmake all→ ruff clean; 3637 passed, 22 skippedNot run:
ash scan.Boundaries touched
sdpm/references/(one bullet inslide-json-elements.md)Closes #667