From 1c858e58755ca15eada3928746ab695967f8e144 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Fri, 26 Jan 2024 11:39:27 +0100 Subject: [PATCH] another attempt to clean up and not let remainings --- src/Spec2-Core/SpJobListPresenter.class.st | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Spec2-Core/SpJobListPresenter.class.st b/src/Spec2-Core/SpJobListPresenter.class.st index 585f1388..0c69ca7a 100644 --- a/src/Spec2-Core/SpJobListPresenter.class.st +++ b/src/Spec2-Core/SpJobListPresenter.class.st @@ -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' } @@ -81,7 +81,7 @@ SpJobListPresenter >> initialize [ { #category : 'initialization' } SpJobListPresenter >> initializePresenters [ - self layout: SpBoxLayout newTopToBottom + self resetLayout ] { #category : 'initialization' } @@ -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 +]