Unlimited Wordpress themes, plugins, graphics & courses! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

10.3 Constraints

“Constraints” are another feature added to Affinity Designer in version 1.5. Constraints allow you to control how a child element will be affected if its parent is resized. With this functionality you can save time when reusing objects and, to a degree, simulate responsive layouts. Learn how to use constraints in this lesson.

10.3 Constraints

Hey, welcome back to the bonus lessons in Affinity Designer Quick Start. In this lesson, we're gonna go through how to use the constraint system that was added in Designer 1.5. Now, constraints are really cool because what they'll do is to decide how a child object is gonna be affected when its parent is scaled. So let's just draw a couple of quick shapes and we'll have a look at how a child object is affected by its parent by default. So I'm just gonna draw out a square or a rectangle, rather. Let's change its color. Turn that down a little bit. And then we're going to put a circle inside that. Give that a different color, And we'll nest that inside the rectangle. Just center all of this, because, I'm a little bit obsessive. All right, now let's look at what happens if we select the parent object and then we resize. So you can see that as we shrink and stretch the parent object, the child object goes along with it. But what if you don't want that child object to behave that way? What if you wanted to keep its aspect ratio or to scale in one way and not in another, for example? Well, this is where the constraint system comes into play. To use the constraint system, you need to open up the Constraints panel. So go to View > Studio> Constraints. Now this little interface here represents the constraint settings on the currently selected object. So we're gonna select our child object because this is only relevant to child objects, not to parent objects. And now we can start messing around with the settings. So to have a quick overview of what each of these are. So these lines here in the center, the horizontal and vertical lines here, these control how the child object will scale. These dotted lines around the outside here control how the child object is anchored relative to each one of the four corners of the parent. And then these two little icons here allow you to decide whether you want your child object to maintain its aspect ratio, and if so, if you want it to be clipped when the parent is resized. So let's start by looking at the Scaling settings. If any of these lines are solid rather than dashed, like these ones on the outside, that means they are active rather than inactive. So if we click on this horizontal line here, that's become dashed, and what that means is we've turned off the horizontal scaling of the child. So now let's select the parent again and we'll transform the shape. Now this time, you can see the child is not scaling itself horizontally. It will, however, still scale itself vertically because we still have that setting active. And if we go back into our child again, and now we turn off this scaling as well. Now it won't scale in either direction, vertically or horizontally. So we'll just turn those both back on for now. These other lines around the outside here control the anchoring of the child object. So if you turn any one of these lines one, it means that the child object is not gonna shift its position relative to that side of the parent when it's scaled. So let's turn on the top anchor and now we'll scale the parent again. And this time, even though we have the vertical scaling, you can see the top position on the child is not moving. It's anchored in that one place. You can turn on multiple anchors and that object is not going to shift, relative to any side that you have this switched on for. So we'll just turn those off again, and then finally, down in the bottom right corner here, you can control whether the aspect ratio of the child is retained or not during scaling. If either of these are active, then the aspect ratio of the child is gonna be preserved. The difference is, this one is called min fit, on the left, and on the right, this is called max fit. So when you have min fit enabled, the child is always gonna stay smaller than the parent, and it will never be clipped, no matter what the size of the parent is. So if we select the parent again, now you could see that we're maintaining the aspect ratio of our child. And it doesn't matter how small we get the parent, we can always see the child in its entirety. On the other hand, if we go back in and we select max fit instead, then this is still gonna keep its aspect ratio, but it will allow the child to be clipped. So when we scale this way we can clip this off. When we scale vertically we can clip it off as well. When we scale in both directions, you'll see the child is scaling down, but we can only see all of it as long as the aspect ratio of the parent allows that to happen. But if the aspect ratio doesn't allow it, then it will clip that child. These two options are useful for different things. Min fit, where you make sure the child always stays smaller than the parent, is good for things like icons or headings, for example, where no matter what you don't want any part of that child item to be clipped. Max fit, on the other hand, is good for thing like a nested image, for example. You might need to make sure that that image always fills up the height of its parent so that you can avoid letterboxing, even if that means that it has to be clipped in the process. So you got both of those options available to you depending on exactly what it is that you're designing. So that covers the constraint system. You can use it with any child object but just remember, it doesn't have any effect on parent objects. In the next bonus lesson we're gonna move on to working with symbols in Affinity Designer environment. Now symbols are another thing that are really popular from other design apps. And they came to Affinity Designer in version 1.5. Symbols are really fantastic for creating reusable items inside your designs and for giving you the ability to edit multiple items simultaneously by just editing one instance of a symbol. So in the next lesson, we're gonna go through how to use the symbol system in Affinity Designer. I'll see you there.

Back to the top