Skip to content

Commit b9029d6

Browse files
authored
Merge pull request #235 from DuneSt/jecisc-patch-2
v2.1.0
2 parents d65748d + 4409020 commit b9029d6

File tree

5 files changed

+91
-9
lines changed

5 files changed

+91
-9
lines changed

Diff for: .travis.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ os:
66
#- osx
77

88
smalltalk:
9-
- Pharo-7.0
10-
- Pharo-6.1
9+
- Pharo64-8.0
10+
- Pharo64-7.0
11+
- Pharo64-6.1
1112
#- GemStone-3.4.1
1213

1314
matrix:
1415
fast_finish: true
15-
16-
# This make Gemstone builds 3x faster
17-
#cache:
18-
# directories:
19-
# - $SMALLTALK_CI_CACHE
16+
allow_failures:
17+
- smalltalk: Pharo64-8.0
18+
19+
# This make Gemstone builds 3x faster
20+
#cache:
21+
# directories:
22+
# - $SMALLTALK_CI_CACHE

Diff for: CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<!--git log --pretty="* %s ([%h](https://github.com/DuneSt/MaterialDesignLite/commit/%H))" v1.3.2...HEAD-->
22

3+
4+
# [v2.1.0](https://github.com/DuneSt/MaterialDesignLite/compare/v2.0.1...v2.1.0) (2019-02-07)
5+
6+
## Feature
7+
8+
* Allow to set tooltip position on MDLMenuButtonWidget ([244a38a](https://github.com/DuneSt/MaterialDesignLite/commit/244a38a1f69bd37c94febe044661ab7b17fd677d))
9+
10+
## Infastructure
11+
12+
* Enable Pharo 8 on CI with allowed fasilures ([c93b7a3](https://github.com/DuneSt/MaterialDesignLite/commit/c93b7a3e302fd0b615f3c1c7f7f7ea3f5b9ac870))
13+
314
# [v2.0.1](https://github.com/DuneSt/MaterialDesignLite/compare/v2.0.0...v2.0.1) (2019-01-24)
415

516
## Infastructure

Diff for: src/Material-Design-Lite-Demo/MDLDemo.class.st

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ MDLDemo class >> open [
8181

8282
{ #category : #versions }
8383
MDLDemo class >> version [
84-
^ 'v2.0.1'
84+
^ 'v2.1.0'
8585
]
8686

8787
{ #category : #hooks }

Diff for: src/Material-Design-Lite-Widgets-Tests/MDLMenuButtonWidgetTests.class.st

+32
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,38 @@ MDLMenuButtonWidgetTests >> testButtonContents [
2323
self assert: [ :html | menu renderButtonContentOn: html ] generates: '<i class="material-icons">mood</i>'
2424
]
2525

26+
{ #category : #tests }
27+
MDLMenuButtonWidgetTests >> testDefaultDescriptionPositionAtBottom [
28+
self assert: menu descriptionPosition equals: #bottom
29+
]
30+
31+
{ #category : #tests }
32+
MDLMenuButtonWidgetTests >> testDescriptionAtBottom [
33+
menu descriptionAtBottom.
34+
35+
self assert: menu descriptionPosition equals: #bottom
36+
]
37+
38+
{ #category : #tests }
39+
MDLMenuButtonWidgetTests >> testDescriptionAtLeft [
40+
menu descriptionAtLeft.
41+
menu description: 'Description'.
42+
self assert: menu descriptionPosition equals: #left.
43+
self assert: [ :html | html render: menu ] generatedIncludes: 'mdl-tooltip--left'
44+
]
45+
46+
{ #category : #tests }
47+
MDLMenuButtonWidgetTests >> testDescriptionAtRight [
48+
menu descriptionAtRight.
49+
self assert: menu descriptionPosition equals: #right
50+
]
51+
52+
{ #category : #tests }
53+
MDLMenuButtonWidgetTests >> testDescriptionAtTop [
54+
menu descriptionAtTop.
55+
self assert: menu descriptionPosition equals: #top
56+
]
57+
2658
{ #category : #tests }
2759
MDLMenuButtonWidgetTests >> testLabelFor [
2860
menu textBlock: nil.

Diff for: src/Material-Design-Lite-Widgets/MDLMenuButtonWidget.class.st

+37-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Class {
3939
'description',
4040
'action',
4141
'sortBlock',
42-
'buttonContent'
42+
'buttonContent',
43+
'descriptionPosition'
4344
],
4445
#category : #'Material-Design-Lite-Widgets-Menu'
4546
}
@@ -134,6 +135,40 @@ MDLMenuButtonWidget >> description: anObject [
134135
description := anObject
135136
]
136137

138+
{ #category : #options }
139+
MDLMenuButtonWidget >> descriptionAtBottom [
140+
"Sets the description of the menu at its bottom."
141+
self descriptionPosition: #bottom
142+
]
143+
144+
{ #category : #options }
145+
MDLMenuButtonWidget >> descriptionAtLeft [
146+
"Sets the description of the menu at its left."
147+
self descriptionPosition: #left
148+
]
149+
150+
{ #category : #options }
151+
MDLMenuButtonWidget >> descriptionAtRight [
152+
"Sets the description of the menu at its right."
153+
self descriptionPosition: #right
154+
]
155+
156+
{ #category : #options }
157+
MDLMenuButtonWidget >> descriptionAtTop [
158+
"Sets the description of the menu at its top."
159+
self descriptionPosition: #top
160+
]
161+
162+
{ #category : #accessing }
163+
MDLMenuButtonWidget >> descriptionPosition [
164+
^ descriptionPosition ifNil: [ descriptionPosition := #bottom ]
165+
]
166+
167+
{ #category : #accessing }
168+
MDLMenuButtonWidget >> descriptionPosition: anObject [
169+
descriptionPosition := anObject
170+
]
171+
137172
{ #category : #private }
138173
MDLMenuButtonWidget >> labelFor: anObject [
139174
^ self textBlock ifNil: [ anObject asString ] ifNotNil: [ :tb | tb cull: anObject ]
@@ -206,6 +241,7 @@ MDLMenuButtonWidget >> renderTooltipOn: html [
206241
html mdlTooltip
207242
for: self id;
208243
large;
244+
position: self descriptionPosition;
209245
with: self description
210246
]
211247

0 commit comments

Comments
 (0)