Skip to content

Commit

Permalink
Renamed GtTitleWithFootersLiveSlide
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Nierstrasz committed Sep 2, 2024
1 parent 22367dc commit d2b2e69
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 51 deletions.
8 changes: 4 additions & 4 deletions src/GToolkit-Presenter/GtProtoLiveSlide.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ GtProtoLiveSlide >> title [
]

{ #category : #decorating }
GtProtoLiveSlide >> titleWithCenteredTexts [
^ GtTitleWithCenteredTextsSlide new
GtProtoLiveSlide >> titleWithFooter [
^ GtTitleWithFooterLiveSlide new
definingMethod: (GtPhlowDefiningMethodsCollector forContext: thisContext) collect
]

{ #category : #decorating }
GtProtoLiveSlide >> titleWithFooter [
^ GtTitleWithFooterLiveSlide new
GtProtoLiveSlide >> titleWithFooters [
^ GtTitleWithFootersLiveSlide new
definingMethod: (GtPhlowDefiningMethodsCollector forContext: thisContext) collect
]

Expand Down
7 changes: 2 additions & 5 deletions src/GToolkit-Presenter/GtTitleWithFooterLiveSlide.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ Superseded by GtTitleWithCenteredTextsSlide. Retain this only for compatibility.
"
Class {
#name : #GtTitleWithFooterLiveSlide,
#superclass : #GtTitleWithCenteredTextsSlide,
#instVars : [
'footer'
],
#superclass : #GtTitleWithFootersLiveSlide,
#category : #'GToolkit-Presenter'
}

Expand All @@ -20,5 +17,5 @@ GtTitleWithFooterLiveSlide >> footer: aString [

{ #category : #accessing }
GtTitleWithFooterLiveSlide >> footerWithFormat: aText [
self newTextWithFormat: aText
self newFooterWithFormat: aText
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
Like a title slide but with as many centred texts below as you like.
"
Class {
#name : #GtTitleWithCenteredTextsSlide,
#name : #GtTitleWithFootersLiveSlide,
#superclass : #GtTitleLiveSlide,
#instVars : [
'texts',
'textMargin',
'subtitleBottomPadding',
'textBottomPadding'
'footers',
'footerBottomPadding'
],
#category : #'GToolkit-Presenter'
}

{ #category : #'api - instantiation' }
GtTitleWithCenteredTextsSlide >> create [
GtTitleWithFootersLiveSlide >> create [
| container textContainer |
container := BlElement new
constraintsDo: [ :c |
Expand Down Expand Up @@ -42,79 +41,79 @@ GtTitleWithCenteredTextsSlide >> create [
top: 40;
bottom: self subtitleBottomPadding);
text: subtitle) ].
texts
footers
do: [ :aText |
textContainer
addChild: (BlTextElement new
constraintsDo: [ :c | c linear horizontal alignCenter ];
padding: (BlInsets
top: 40;
bottom: self textBottomPadding);
bottom: self footerBottomPadding);
text: aText) ].
container addChild: textContainer.
^ container
]

{ #category : #initialization }
GtTitleWithCenteredTextsSlide >> defaultSubtitleBottomPadding [
^ 40
GtTitleWithFootersLiveSlide >> defaultFooterBottomPadding [
^ 10
]

{ #category : #initialization }
GtTitleWithCenteredTextsSlide >> defaultTextBottomPadding [
^ 10
GtTitleWithFootersLiveSlide >> defaultSubtitleBottomPadding [
^ 40
]

{ #category : #acccessing }
GtTitleWithCenteredTextsSlide >> defaultTextMargin [
^ 50
{ #category : #accessing }
GtTitleWithFootersLiveSlide >> footerBottomPadding [
^ footerBottomPadding
]

{ #category : #accessing }
GtTitleWithFootersLiveSlide >> footerBottomPadding: anObject [
footerBottomPadding := anObject
]

{ #category : #initialization }
GtTitleWithCenteredTextsSlide >> initialize [
GtTitleWithFootersLiveSlide >> initialize [
super initialize.
self subtitleBottomPadding: self defaultSubtitleBottomPadding.
self textBottomPadding: self defaultTextBottomPadding.
self textMargin: self defaultTextMargin.
texts := OrderedCollection new
self footerBottomPadding: self defaultFooterBottomPadding.
footers := OrderedCollection new
]

{ #category : #acccessing }
GtTitleWithCenteredTextsSlide >> newText: aRopedText [
self newTextWithFormat: (aRopedText asRopedText glamorousRegularFont; fontSize: 20)
GtTitleWithFootersLiveSlide >> newFooter: aRopedText [
self
newFooterWithFormat: (aRopedText asRopedText
glamorousRegularFont;
fontSize: 20)
]

{ #category : #acccessing }
GtTitleWithCenteredTextsSlide >> newTextWithFormat: aRopedText [
texts add: aRopedText asRopedText
GtTitleWithFootersLiveSlide >> newFooterWithFormat: aRopedText [
footers add: aRopedText asRopedText
]

{ #category : #accessing }
GtTitleWithCenteredTextsSlide >> subtitleBottomPadding [
^ subtitleBottomPadding
{ #category : #acccessing }
GtTitleWithFootersLiveSlide >> newText: aRopedText [
self deprecated: 'use newFooter:'.

self newTextWithFormat: (aRopedText asRopedText glamorousRegularFont; fontSize: 20)
]

{ #category : #accessing }
GtTitleWithCenteredTextsSlide >> subtitleBottomPadding: anObject [
subtitleBottomPadding := anObject
{ #category : #acccessing }
GtTitleWithFootersLiveSlide >> newTextWithFormat: aRopedText [
self deprecated: 'use newFooterWithFormat:'.
footers add: aRopedText asRopedText
]

{ #category : #accessing }
GtTitleWithCenteredTextsSlide >> textBottomPadding [
^ textBottomPadding
GtTitleWithFootersLiveSlide >> subtitleBottomPadding [
^ subtitleBottomPadding
]

{ #category : #accessing }
GtTitleWithCenteredTextsSlide >> textBottomPadding: anObject [
textBottomPadding := anObject
]

{ #category : #acccessing }
GtTitleWithCenteredTextsSlide >> textMargin [
^ textMargin
]

{ #category : #acccessing }
GtTitleWithCenteredTextsSlide >> textMargin: aNumber [
textMargin := aNumber
GtTitleWithFootersLiveSlide >> subtitleBottomPadding: anObject [
subtitleBottomPadding := anObject
]

0 comments on commit d2b2e69

Please sign in to comment.