Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3718)

Issue 118950043: Allow specifying different alignment for grob and its parent (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 9 months ago by janek
Modified:
9 years, 8 months ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Allow specifying different alignment for grob and its parent This gives users more possibilities for grob positioning - for example, they can align left edge of a grob on center of its parent, etc.

Patch Set 1 #

Total comments: 4

Patch Set 2 : address Werner's comments #

Patch Set 3 : add regtest #

Patch Set 4 : fix comment #

Patch Set 5 : add missing @ #

Patch Set 6 : Use separate properties for self- and parent-alignment #

Total comments: 2

Patch Set 7 : fill in missing interfaces #

Patch Set 8 : use a callback for synchronizing parent- and self-alignment #

Patch Set 9 : remove stuff that i missed with previous patchset #

Patch Set 10 : i hope this is the last thing i missed. #

Patch Set 11 : restore old behaviour everywhere.y #

Patch Set 12 : don't use grob::copy-property; copy from self-alignment if unset #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -18 lines) Patch
A input/regression/parent-alignment-synchronized-with-self-alignment.ly View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +36 lines, -0 lines 0 comments Download
A input/regression/self-alignment-and-parent-alignment.ly View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
M lily/self-alignment-interface.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +28 lines, -18 lines 0 comments Download
M scm/define-grob-properties.scm View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
M scm/define-grobs.scm View 1 2 3 4 5 6 7 8 9 10 11 14 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 19
lemzwerg
LGTM. https://codereview.appspot.com/118950043/diff/1/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): https://codereview.appspot.com/118950043/diff/1/scm/define-grob-properties.scm#newcode814 scm/define-grob-properties.scm:814: Value @w{@code{-1}} means left aligned, @code{0}@tie{}centered, and ...
9 years, 9 months ago (2014-07-21 00:28:04 UTC) #1
janek
address Werner's comments
9 years, 9 months ago (2014-07-21 06:02:31 UTC) #2
janek
Fixed. Thanks for review! https://codereview.appspot.com/118950043/diff/1/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): https://codereview.appspot.com/118950043/diff/1/scm/define-grob-properties.scm#newcode814 scm/define-grob-properties.scm:814: Value @w{@code{-1}} means left aligned, ...
9 years, 9 months ago (2014-07-21 06:03:06 UTC) #3
david.nalesnik
Do you think a regtest would be appropriate? LGTM. A natural extension of self-alignment capabilities. ...
9 years, 9 months ago (2014-07-23 14:45:50 UTC) #4
david.nalesnik
On Wed, Jul 23, 2014 at 9:45 AM, <david.nalesnik@gmail.com> wrote: > > > P.S. Can ...
9 years, 9 months ago (2014-07-23 14:52:23 UTC) #5
janek
2014-07-23 16:45 GMT+02:00 <david.nalesnik@gmail.com>: > Do you think a regtest would be appropriate? Definitely! I'll ...
9 years, 9 months ago (2014-07-23 21:25:09 UTC) #6
janek
add regtest
9 years, 9 months ago (2014-07-26 18:32:34 UTC) #7
janek
fix comment
9 years, 9 months ago (2014-07-26 18:38:52 UTC) #8
janek
add missing @
9 years, 9 months ago (2014-07-26 21:12:29 UTC) #9
janek
Use separate properties for self- and parent-alignment
9 years, 8 months ago (2014-08-01 16:55:46 UTC) #10
janek
fill in missing interfaces
9 years, 8 months ago (2014-08-01 17:01:24 UTC) #11
dak
https://codereview.appspot.com/118950043/diff/100001/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): https://codereview.appspot.com/118950043/diff/100001/lily/self-alignment-interface.cc#newcode139 lily/self-alignment-interface.cc:139: if (robust_scm2string(par_align, "") == "same-as-self-alignment") That's too ugly to ...
9 years, 8 months ago (2014-08-01 17:08:48 UTC) #12
janek
use a callback for synchronizing parent- and self-alignment
9 years, 8 months ago (2014-08-01 19:11:29 UTC) #13
janek
How do you like it now? https://codereview.appspot.com/118950043/diff/100001/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): https://codereview.appspot.com/118950043/diff/100001/lily/self-alignment-interface.cc#newcode139 lily/self-alignment-interface.cc:139: if (robust_scm2string(par_align, "") ...
9 years, 8 months ago (2014-08-01 19:13:18 UTC) #14
janek
remove stuff that i missed with previous patchset
9 years, 8 months ago (2014-08-01 19:21:20 UTC) #15
janek
i hope this is the last thing i missed.
9 years, 8 months ago (2014-08-01 19:22:43 UTC) #16
janek
restore old behaviour everywhere.y
9 years, 8 months ago (2014-08-02 07:25:01 UTC) #17
janek
don't use grob::copy-property; copy from self-alignment if unset
9 years, 8 months ago (2014-08-02 09:56:38 UTC) #18
janek
9 years, 8 months ago (2014-08-09 19:36:15 UTC) #19
Message was sent while issue was closed.
Pushed as two commits (to differentiate between new functionality and restoring
old behaviour):

commit d7b067b15ae975ee52f91bd674cc667baa09eb04
Author: Janek Warchoł <lemniskata.bernoullego@gmail.com>
Date:   Sat Aug 9 21:08:08 2014 +0200

    Grob alignment: get back 2.19.9 behaviour
    
    A series of commits
    
    *   0bc7f77 Issue 3978: Merge alignment cleanup
    |\
    | * d6604b0 define-grobs.scm: reorder properties alphabetically
    | * 6f3f8f0 TextScript, CombineTextScript: use aligned_on_parent
    | * 1d76502 Replace XY-offset closures with aligned_on_parent where possible
    | * 09412c2 Clean up DynamicText horizontal alignment.
    |/
    
    changed how some grobs (notably DynamicTexts) reacted to overriding
    self-alignment-X property.  The new behaviour was confusing for some
    users, so this commit gets back the old behaviour.  The possibility
    of using separate alignment factors for grob and its parent, introduced
    by previous commit (see Issue 4022), makes it possible to get pre-0bc7f77
    behaviour just by changing default values of parent-alignment-*; leaving
    up the possibility to easily change them in the future.
    
    See http://lists.gnu.org/archive/html/lilypond-user/2014-07/msg00691.html
    and https://code.google.com/p/lilypond/issues/detail?id=4036
    for details.

commit 0c4f221e5d4656abd47f067907611df200fbfc20
Author: Janek Warchoł <lemniskata.bernoullego@gmail.com>
Date:   Sun Jul 20 20:07:16 2014 +0200

    Issue 4022: Allow specifying different alignment for grob and its parent
    
    This gives users more possibilities for grob positioning - for example,
    they can align left edge of a grob on center of its parent, etc.
    
    Also fix Issue 4054.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b