Skip to content

Commit

Permalink
Refactored GtTitleWithFooterLiveSlide
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Nierstrasz committed Sep 2, 2024
1 parent adcea90 commit 22367dc
Showing 1 changed file with 6 additions and 50 deletions.
56 changes: 6 additions & 50 deletions src/GToolkit-Presenter/GtTitleWithFooterLiveSlide.class.st
Original file line number Diff line number Diff line change
@@ -1,43 +1,15 @@
"
Superseded by GtTitleWithCenteredTextsSlide. Retain this only for compatibility.
"
Class {
#name : #GtTitleWithFooterLiveSlide,
#superclass : #GtTitleLiveSlide,
#superclass : #GtTitleWithCenteredTextsSlide,
#instVars : [
'footer',
'subtitleBottomPadding'
'footer'
],
#category : #'GToolkit-Presenter'
}

{ #category : #'api - instantiation' }
GtTitleWithFooterLiveSlide >> create [
^ BlElement new
constraintsDo: [ :c |
c horizontal matchParent.
c vertical matchParent ];
layout: BlLinearLayout horizontal;
addChild: (BlElement new
constraintsDo: [ :c |
c horizontal matchParent.
c vertical fitContent.
c linear vertical alignCenter ];
layout: BlLinearLayout vertical;
addChild: (BlTextElement new
constraintsDo: [ :c | c linear horizontal alignCenter ];
padding: (BlInsets
top: 40;
bottom: self titleBottomPadding);
text: title);
addChild: (BlTextElement new
constraintsDo: [ :c | c linear horizontal alignCenter ];
padding: (BlInsets
top: 40;
bottom: self subtitleBottomPadding);
text: subtitle);
addChild: (BlTextElement new
constraintsDo: [ :c | c linear horizontal alignCenter ];
text: footer))
]

{ #category : #accessing }
GtTitleWithFooterLiveSlide >> footer: aString [
self
Expand All @@ -48,21 +20,5 @@ GtTitleWithFooterLiveSlide >> footer: aString [

{ #category : #accessing }
GtTitleWithFooterLiveSlide >> footerWithFormat: aText [
footer := aText
]

{ #category : #initialization }
GtTitleWithFooterLiveSlide >> initialize [
super initialize.
self subtitleBottomPadding: 10
]

{ #category : #'api - instantiation' }
GtTitleWithFooterLiveSlide >> subtitleBottomPadding [
^ subtitleBottomPadding
]

{ #category : #accessing }
GtTitleWithFooterLiveSlide >> subtitleBottomPadding: anInteger [
subtitleBottomPadding := anInteger
self newTextWithFormat: aText
]

0 comments on commit 22367dc

Please sign in to comment.