Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inset margins of FrameSvgItems #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

veggero
Copy link

@veggero veggero commented Jan 23, 2023

SVG items can currently define a "inset" property that defines how much inset the element should have. The use case for this is e.g. including a shadow around the element and then setting the inset to be the same size as the shadow.

The idea is that this shouldn't change much unless you're using inset. However, I do change how margins work, since they were previously used to define the margin outside the element, and now they're used to define the margin inside them, as I thought was more appropriate.

SVG items can currently define a "inset" property that defines how much inset the element should have. The use case for this is e.g. including a shadow around the element and then setting the inset to be the same size as the shadow.
anchors.topMargin: -rect.inset.top + PlasmaCore.Units.smallSpacing * 1.5
anchors.leftMargin: -rect.inset.left + PlasmaCore.Units.smallSpacing * 1.5
anchors.rightMargin: -rect.inset.right + PlasmaCore.Units.smallSpacing * 1.5
anchors.bottomMargin: -rect.inset.bottom + PlasmaCore.Units.smallSpacing * 1.5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But now they'll not respect the scale of the applet? There's an option in the settings to increase or decrease the scale of the applet to make it larger or smaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants