kasper / phoenix

A lightweight macOS window and app manager scriptable with JavaScript
https://kasper.github.io/phoenix/
Other
4.36k stars 128 forks source link

`textAlignment` for input modals is flipped between `center` and `right` #302

Closed mafredri closed 1 year ago

mafredri commented 2 years ago

I'm testing out input modals and noticed that textAlignment seems to be flipped between center and right.

Example:

const m = Modal.build({
    isInput: true,
    inputPlaceholder: 'Search',
    textAlignment: 'center',
});
m.show();

Result:

image

I'm a bit flabbergasted as I thought this was a clear cut fix and was going to submit a PR, but I tried moving the values around in https://github.com/kasper/phoenix/blob/0028edfb3fa6728a552ab837f478c4eaee6ed16f/Phoenix/PHModalWindowController.m#L123-L125 to no avail. I swapped @1 and @2, tried to re-order the items, and even swapped everything around (including left), but I couldn't get the order right.

Finally by removing one of the center options (centre, and having it as @2) I managed to get it behaving as I'd expect, but I don't think that's not the wanted solution 🤔.

kasper commented 2 years ago

@mafredri Thanks for checking! I will try to see what’s happening here.

kasper commented 1 year ago

I couldn’t reproduce this. I think this is a side effect of the layout issue fixed in #324.