Skip to content

Commit

Permalink
another attempt to clean up and not let remainings
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Jan 26, 2024
1 parent 44bbfd8 commit 1c858e5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Spec2-Core/SpJobListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SpJobListPresenter >> addJobPresenter: aJob [
ifTrue: [ self open ].

self withWindowDo: [ :window |
window resize: 500@((layout children size * self jobPresenterHeight) + 20) ]
window resize: 500@((layout children size * self jobPresenterHeight) + 10) ]
]

{ #category : 'private' }
Expand Down Expand Up @@ -81,7 +81,7 @@ SpJobListPresenter >> initialize [
{ #category : 'initialization' }
SpJobListPresenter >> initializePresenters [

self layout: SpBoxLayout newTopToBottom
self resetLayout
]

{ #category : 'initialization' }
Expand Down Expand Up @@ -168,10 +168,17 @@ SpJobListPresenter >> removeJobPresenter: aJob [

self layout remove: presenter.

self layout children
ifEmpty: [ self withWindowDo: [ :window | window close ] ].
self layout children ifEmpty: [
self withWindowDo: [ :window | window close ].
self resetLayout ].

self withWindowDo: [ :window |
window resize: 500@(layout children size * self jobPresenterHeight).
window centered ]
]

{ #category : 'private' }
SpJobListPresenter >> resetLayout [

self layout: SpBoxLayout newTopToBottom
]

0 comments on commit 1c858e5

Please sign in to comment.