← Back to team overview

phatch-dev team mailing list archive

[Bug 386494] Re: Justify options for Text action

 

Alright.

I could implement something like this:
Horizontal/vertical justify middle:
Default offset value 0%. Offset range -100% to 100% from border to border. The position of text would be calculated so that the left/right bound doesn't go past edge on maximum (100%). This would be pretty much equivalent of the current behavior except that it keeps text inside bound for values between -100% and 100%.

In case of left/right, top/bottom things get a bit different:
Default offset value 0%. Offset range depends on selected option according to following rules:
left/top -> offset range set as 0% to 100% (negative offset would go past border)
right/bottom -> offset range set as -100% to 0% (same with positive).

So the effect of choosing any other than "middle" option would cause
changes in behavior of offset due to the nature of zero. :)

I admit that the proposed solution seems perhaps a bit too complicated.
Let me know if you have something neater in mind.

I agree that renaming "offset" as "position" might reflect its purpose
better. I'm fine with the change.

-- 
Justify options for Text action
https://bugs.launchpad.net/bugs/386494
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Incomplete

Bug description:
This patch implements https://blueprints.launchpad.net/phatch/+spec/text-justification . I removed the offset fields and replaced them with justification options. I changed the middle item of horizontal justification to "middle" just to be consistent with vertical justification. In both cases "middle" is also the default option selected.



References