Skip to content

Commit

Permalink
Merge c42a324
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvc committed Nov 4, 2024
2 parents 3b78233 + c42a324 commit e749d8d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
28 changes: 17 additions & 11 deletions src/GToolkit4Git/PureGitTrackedFile.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -92,32 +92,38 @@ PureGitTrackedFile >> gtViewHistoryFor: composite [
{ #category : #'*GToolkit4Git' }
PureGitTrackedFile >> gtViewKumpelFor: composite [
<gtView>
| identityIndex |
^ composite explicit
title: 'Kumpel';
priority: 60;
stencil: [ | container colors |
stencil: [ | container colors strongColors lightColors |
lightColors := BrGlamorousColors distinctTenLightColors
, {Color veryLightGray}.
strongColors := BrGlamorousColors distinctTenStrongColors , {Color gray}.
colors := BrExplicitIdentityNormalizer new
colors: BrGlamorousColors distinctTenLightColors;
defaultColor: Color veryLightGray.
candidates: (1 to: 10);
defaultCandidate: 11.
container := BlElement new.
self uniqueTrackedLines
do: [ :trackedLine |
| element |
element := trackedLine asKumpelGraphElement.
identityIndex := colors value: (self authorOfTrackedLine: trackedLine).
element
addAptitude: (BrStyleCommonAptitude new
default: [ :s |
s background: (colors value: (self authorOfTrackedLine: trackedLine)).
s border: (colors value: (self authorOfTrackedLine: trackedLine)) ];
s background: (lightColors at: identityIndex).
s border: (lightColors at: identityIndex) ];
hovered: [ :s |
s background: (colors value: (self authorOfTrackedLine: trackedLine)) darker.
s
border: (colors value: (self authorOfTrackedLine: trackedLine)) darker ];
pressed: [ :s | s background: (colors value: (self authorOfTrackedLine: trackedLine)) muchDarker ]).
element when: BlClickEvent do: [:e | e target phlow spawnObject: trackedLine ].
s background: (strongColors at: identityIndex) darker.
s border: (strongColors at: identityIndex) darker ];
pressed: [ :s | s background: (strongColors at: identityIndex) muchDarker ]).
element
when: BlClickEvent
do: [ :e | e target phlow spawnObject: trackedLine ].
container addChild: element ].
container
size: (self versions size * PureGitTrackedLine versionWidth)
size: ((self versions size * (PureGitTrackedLine versionWidth + PureGitTrackedLine versionMargin)) - PureGitTrackedLine versionMargin)
@ (PureGitTrackedLine lineHeight * self maxLinesCount).
container beInSeparateCompositionLayer asScrollableElement
margin: (BlInsets all: 10) ];
Expand Down
9 changes: 6 additions & 3 deletions src/GToolkit4Git/PureGitTrackedFileVersion.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ PureGitTrackedFileVersion >> gtViewKumpelFor: composite [
element
border: (colors value: (trackedFile authorOfTrackedLine: trackedLine)).
container addChild: element ].
container size: ((trackedFile versions size) * PureGitTrackedLine versionWidth) @ (PureGitTrackedLine lineHeight * (trackedFile maxLinesCount)).
container
size: ((trackedFile versions size * (PureGitTrackedLine versionWidth + PureGitTrackedLine versionMargin)) - PureGitTrackedLine versionMargin)
@ (PureGitTrackedLine lineHeight * trackedFile maxLinesCount).
container
addChild: (BlElement new
background: (Color black alpha: 0.3);
zIndex: 100;
size: PureGitTrackedLine versionWidth @ (PureGitTrackedLine lineHeight * (lines size));
size: PureGitTrackedLine versionWidth @ (PureGitTrackedLine lineHeight * lines size);
relocate: ((versionNumber - 1)
* (PureGitTrackedLine versionWidth + PureGitTrackedLine versionMargin))
@ 0).
container beInSeparateCompositionLayer asScrollableElement margin: (BlInsets all: 10) ]
container beInSeparateCompositionLayer asScrollableElement
margin: (BlInsets all: 10) ]
]

0 comments on commit e749d8d

Please sign in to comment.