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

Alignment, Justify, Orientation, TitleLayout, Window types #114

Merged
merged 12 commits into from
Dec 13, 2023

Conversation

MikeOverbeck
Copy link
Contributor

This tightens up Alignment, Justify, Orientation, and Window types

This is a modification of #68 with merge conflicts resolved from the latest master, plus an _AlignmentPropertyTitleLayout interface for TitleLayout context.

Some boilerplate testing code :

const win = new Window('palette', 'testing panel', undefined, {
    resizeable: true,
})

win.alignChildren = 'invalidString' // fail
win.alignChildren = 'center'
win.alignChildren = ['fill', 'top', 'left'] // fail
win.alignChildren = ['fill', 'top']
win.alignChildren = [3, 2]

const textGrp = win.add('group')
textGrp.orientation = 'invalidString' // fail
textGrp.orientation = 'row'
const staticText = textGrp.add('statictext', undefined, 'here is some text', {
    truncate: 'none',
})
staticText.justify = 'invalidString' // fail
staticText.justify = 'left'

const tabbedPanel = win.add('tabbedpanel')
tabbedPanel.titleLayout.characters = 20
tabbedPanel.titleLayout.spacing = 5
tabbedPanel.titleLayout.characters = 12
tabbedPanel.titleLayout.justify = 'left'
tabbedPanel.titleLayout.truncate = 'end'
tabbedPanel.titleLayout.alignment = ['fill', 'top'] // fail, 'fill' is not a valid alignment value in this context
tabbedPanel.titleLayout.alignment = ['center', 'top']

win.show()

Relevant doc reference:

Alignment

https://extendscript.docsforadobe.dev/user-interface-tools/control-objects.html?highlight=TitleLayout#alignment

Justify

https://extendscript.docsforadobe.dev/user-interface-tools/control-objects.html?highlight=Justify#justify

Orientation

https://extendscript.docsforadobe.dev/user-interface-tools/window-object.html?highlight=orientation#orientation

TitleLayout

https://extendscript.docsforadobe.dev/user-interface-tools/control-objects.html?highlight=TitleLayout#titlelayout

Window Object Constructor

https://extendscript.docsforadobe.dev/user-interface-tools/window-object.html?highlight=Window#window-object-constructor

@MikeOverbeck MikeOverbeck mentioned this pull request Dec 12, 2023
@zlovatt zlovatt merged commit 24001b4 into docsforadobe:master Dec 13, 2023
1 check failed
@zlovatt zlovatt linked an issue Dec 13, 2023 that may be closed by this pull request
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.

Group.alignChildren can take a string or [string, string] argument
3 participants