gorodinskiy Posted March 28, 2023 Posted March 28, 2023 Hello, I'm not sure where to ask this question. Let's say I want to create a button in designer v2 and I created a rectangle and text layer: But then I want to align text layer to the left or to the right of the parent layer. but when I select the appropriate option in the alignment toolbar I get the text layer aligned to the page rather than parent layer: The only way I found is to flatten the layers, select them, align them and put the text layer back into the rectangle layer. I'm I doing something wrong? Quote
joe_l Posted March 28, 2023 Posted March 28, 2023 51 minutes ago, gorodinskiy said: I'm I doing something wrong? Why not using the text alignment options of the Paragraph panel? gorodinskiy 1 Quote ---------- Windows 10 / 11, Complete Suite Retail and Beta
GarryP Posted March 28, 2023 Posted March 28, 2023 As additional information to that above, the Alignment functionalities available via the button on the Toolbar – and the “Layer → Alignment” menu items – are for aligning whole layers and not their content. Also, the default “Align to” option is “Spread” which is where the software has aligned your text layer to, e.g. the left-hand edge of the spread (page). If you want to align two layers centrally with each other then you can use either snapping, or the alignment functionalities, or the Alignment Handles, as shown in my attached video (and there might be other ways). 2023-03-28 12-26-03.mp4 Quote
thomaso Posted March 28, 2023 Posted March 28, 2023 In addition to the mentioned text align options and the snapping hint: Also adjusting the size of the text frame in width/height can make use of the snapping feature and thus cause a centred position (green example below). Also note the various ways to combine the text layer with the button shape layer, each with advantages or disadvantages depending on your preferred workflow. • The easiest may be the 1-object solution (yellow) which uses the button shape as text frame (while shape fill/stroke get set in the Text Frame panel). • A Picture Frame (pinkish) offers the additional auto-centre button in its interface, • The Pinning options use the auto centre settings (blue). gorodinskiy 1 Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1
gorodinskiy Posted March 28, 2023 Author Posted March 28, 2023 2 hours ago, joe_l said: Why not using the text alignment options of the Paragraph panel? That's a good point. But even if it works with text I would have the same problem with let's say a rectangle within rectangle: Quote
gorodinskiy Posted March 28, 2023 Author Posted March 28, 2023 53 minutes ago, GarryP said: As additional information to that above, the Alignment functionalities available via the button on the Toolbar – and the “Layer → Alignment” menu items – are for aligning whole layers and not their content. Also, the default “Align to” option is “Spread” which is where the software has aligned your text layer to, e.g. the left-hand edge of the spread (page). If you want to align two layers centrally with each other then you can use either snapping, or the alignment functionalities, or the Alignment Handles, as shown in my attached video (and there might be other ways). 2023-03-28 12-26-03.mp4 Thank you for the reply. In your video the layers are on the same level. In my question, the text layer is «within» a rectangle (cause I need to use «constraints»). Quote
GarryP Posted March 28, 2023 Posted March 28, 2023 5 minutes ago, gorodinskiy said: In my question, the text layer is «within» a rectangle (cause I need to use «constraints»). Ah, sorry, I missed that. In that case the Snapping and Alignment Handles (you need to drag rather than click) techniques should still work, unless I'm still missing something. Quote
gorodinskiy Posted March 28, 2023 Author Posted March 28, 2023 10 minutes ago, thomaso said: In addition to the mentioned text align options and the snapping hint: Also adjusting the size of the text frame in width/height can make use of the snapping feature and thus cause a centred position (green example below). Also note the various ways to combine the text layer with the button shape layer, each with advantages or disadvantages depending on your preferred workflow. • The easiest may be the 1-object solution (yellow) which uses the button shape as text frame (while shape fill/stroke get set in the Text Frame panel). • A Picture Frame (pinkish) offers the additional auto-centre button in its interface, • The Pinning options use the auto centre settings (blue). Thank you for detailed reply! Quote
thomaso Posted March 28, 2023 Posted March 28, 2023 37 minutes ago, gorodinskiy said: the text layer is «within» a rectangle (cause I need to use «constraints») Then the constraint settings override the align options anyway, don't they? – And, I guess, there is no need to nest the text as child inside the parent button shape … it maybe sufficient to simply group them, keeping them as two independent layers which can get aligned via the (auto-)align interface options. Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1
gorodinskiy Posted March 29, 2023 Author Posted March 29, 2023 13 minutes ago, thomaso said: Then the constraint settings override the align options anyway, don't they? – And, I guess, there is no need to nest the text as child inside the parent button shape … it maybe sufficient to simply group them, keeping them as two independent layers which can get aligned via the (auto-)align interface options. I might be wrong, but I think constraints only helps to specify how the layer behaves when parent layer is resized. The solution with groups might work. I just thought that nesting is best way to go about creating such elements as buttons, since you have a parent container that englobes all the content layers. Quote
thomaso Posted March 30, 2023 Posted March 30, 2023 (edited) On 3/29/2023 at 9:24 AM, gorodinskiy said: I might be wrong, but I think constraints only helps to specify how the layer behaves when parent layer is resized. "only"? I am unsure what you want to express exactly. – However, as illustrated there are various ways to achieve parent & nested child layers. "Constraints" are rather helpful for more complex layouts, where usually more than two objects should maintain specific position or size while others should respect different or even none when their parent container gets resized. The easiest (just 1 layer) would be to convert the button shape into a text frame (the yellow sample above) – but unfortunately it works well in APub while it lacks in AD in the missing access to the fill colour of the object, which gets lost once you convert the rounded rectangle object into a text shape object. Also the pinning feature is not available in AD but APub only. So it seems the normal Group (not Constraints) or a layer of type "Layer" would be the most effective workflow here. Just make sure not to use the Art Text Tool but the Frame Text Tool for the initial text creation – otherwise the text will get stretched when the group gets resized. And make use of the text alignment options within the text frames to maintain the left or centred position when the group layer gets widened. Note: in the video below the selection of 4 separate layers was just done to make the 4 bounding boxes visible. In fact you "actually" would select the two parent group layers instead (which also avoids the horizontal offset done to the art text layer at the end of the clip) art text vs frame text group.m4v Edited March 30, 2023 by thomaso note about selection added Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.