1571 ! ! |
1573 ! ! |
1572 |
1574 |
1573 !ChangeList::ListEntry methodsFor:'displaying'! |
1575 !ChangeList::ListEntry methodsFor:'displaying'! |
1574 |
1576 |
1575 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
1577 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h |
|
1578 self displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:false |
|
1579 ! |
|
1580 |
|
1581 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected |
1576 | list cx icon | |
1582 | list cx icon | |
1577 |
1583 |
1578 list := self application. |
1584 list := self application. |
1579 cx := x := newX. |
1585 cx := x := newX. |
1580 (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
1586 (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
1586 (icon := self iconDelta) notNil ifTrue:[ |
1592 (icon := self iconDelta) notNil ifTrue:[ |
1587 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1593 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
1588 ]. |
1594 ]. |
1589 cx := cx + 16."12 + 2px gap" |
1595 cx := cx + 16."12 + 2px gap" |
1590 |
1596 |
1591 super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h. |
1597 super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h isHighlightedAsSelected:isHighlightedAsSelected. |
1592 |
1598 |
1593 "/ "Now, display additional columns..." |
1599 "/ "Now, display additional columns..." |
1594 "/ (list showColumn: #timestamp) ifTrue:[ |
1600 "/ (list showColumn: #timestamp) ifTrue:[ |
1595 "/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
1601 "/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
1596 "/ colS := change timeOfChangeIfKnown notNil |
1602 "/ colS := change timeOfChangeIfKnown notNil |
1604 "/ ]. |
1610 "/ ]. |
1605 |
1611 |
1606 "Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1612 "Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1607 ! |
1613 ! |
1608 |
1614 |
1609 displayLabel:aLabel h:lH on:aGC x:newX y:y h:h isHighlightedAsSelected:isHighlightedAsSelected |
|
1610 | list cx icon | |
|
1611 |
|
1612 list := self application. |
|
1613 cx := x := newX. |
|
1614 (list allowRemoveHolder value and:[list showRemovedHolder value]) ifTrue: [ |
|
1615 (icon := self iconRemoved) notNil ifTrue:[ |
|
1616 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
|
1617 ]. |
|
1618 cx := cx + 22."experimental value - this looks good" |
|
1619 ]. |
|
1620 (icon := self iconDelta) notNil ifTrue:[ |
|
1621 icon displayOn: aGC x: cx y: y + (h / 2) - (icon height / 2) |
|
1622 ]. |
|
1623 cx := cx + 16."12 + 2px gap" |
|
1624 |
|
1625 super displayLabel:aLabel h:lH on:aGC x:cx y:y h:h isHighlightedAsSelected:isHighlightedAsSelected. |
|
1626 |
|
1627 "/ "Now, display additional columns..." |
|
1628 "/ (list showColumn: #timestamp) ifTrue:[ |
|
1629 "/ cx := cx + (aLabel widthOn: aGC) + 5."px - padding" |
|
1630 "/ colS := change timeOfChangeIfKnown notNil |
|
1631 "/ ifTrue:[change timeOfChangeIfKnown printString] |
|
1632 "/ ifFalse:['???']. |
|
1633 "/ [ (colW := colS widthOn: aGC) > (aGC width - cx - 5) ] whileTrue:[ |
|
1634 "/ colS = '...' ifTrue:[ ^ self ]. |
|
1635 "/ colS := '...' , (colS copyFrom: 6). |
|
1636 "/ ]. |
|
1637 "/ super displayLabel:colS h:lH on:aGC x: (aGC width - 5 - colW) y:y h:h. |
|
1638 "/ ]. |
|
1639 |
|
1640 "Modified: / 27-07-2012 / 17:13:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1641 ! |
|
1642 |
|
1643 iconDelta |
1615 iconDelta |
1644 | iconSelector | |
1616 | iconSelector | |
1645 |
1617 |
1646 iconSelector := self iconSelector. |
1618 iconSelector := self iconSelector. |
1647 iconSelector isNil ifTrue:[^nil]. |
1619 iconSelector isNil ifTrue:[^nil]. |