Skip to content

Commit d67f318

Browse files
authored
Merge pull request magritte-metamodel#382 from seandenigris/enh_icon-description
[Enh]: Icon Description
2 parents de9991c + adcda77 commit d67f318

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Extension { #name : #MAIconDescription }
2+
3+
{ #category : #'*Magritte-GToolkit' }
4+
MAIconDescription >> gtAddColumnTo: aView [
5+
6+
self
7+
propertyAt: #columnWidth
8+
ifPresent: [ :width |
9+
aView
10+
column: self label
11+
iconName: [ :anObject | anObject perform: self iconNameAccessor ]
12+
width: width.
13+
^ self ].
14+
15+
aView
16+
column: self label
17+
iconName: [ :anObject | anObject perform: self iconNameAccessor ]
18+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Class {
2+
#name : #MAIconDescription,
3+
#superclass : #MAElementDescription,
4+
#instVars : [
5+
'iconNameAccessor'
6+
],
7+
#category : #'Magritte-Model-Description'
8+
}
9+
10+
{ #category : #accessing }
11+
MAIconDescription >> iconNameAccessor [
12+
^ iconNameAccessor
13+
]
14+
15+
{ #category : #accessing }
16+
MAIconDescription >> iconNameAccessor: anObject [
17+
iconNameAccessor := anObject
18+
]

0 commit comments

Comments
 (0)