Skip to content

Commit

Permalink
Merge pull request #705 from demarey/enh/FileBrowser-edit-path-button
Browse files Browse the repository at this point in the history
move edit path button close to the path
  • Loading branch information
jecisc authored Feb 19, 2024
2 parents c5ecb11 + 6cca9da commit 463a4b5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ StFileNavigationSystemPresenter >> navigationLayout [
vAlignCenter;
add: previousButton expand: false;
add: nextButton expand: false;
add: pathBreadcrumbPresenter;
add: pathBreadcrumbPresenter expand: false;
addLast: configButton;
yourself
]
Expand Down
54 changes: 27 additions & 27 deletions src/NewTools-FileBrowser/StPathBreadcrumbPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,6 @@ Class {
#tag : 'UI'
}

{ #category : 'specs' }
StPathBreadcrumbPresenter class >> defaultLayout [

^ SpBoxLayout newLeftToRight
vAlignCenter;
add: #path;
add: #editButton
expand: false
fill: false
padding: 0;
yourself
]

{ #category : 'specs' }
StPathBreadcrumbPresenter class >> editablelayout [

^ SpBoxLayout newLeftToRight
add: #textInput;
add: #editButton
expand: false
fill: false
padding: 0;
yourself
]

{ #category : 'examples' }
StPathBreadcrumbPresenter class >> example [
<example>
Expand All @@ -78,6 +53,31 @@ StPathBreadcrumbPresenter >> currentDirectory: aFileReference [
self build
]

{ #category : 'layouts' }
StPathBreadcrumbPresenter >> defaultLayout [

^ SpBoxLayout newLeftToRight
vAlignCenter;
add: path;
add: editButton
expand: false
fill: false
padding: 0;
yourself
]

{ #category : 'layouts' }
StPathBreadcrumbPresenter >> editablelayout [

^ SpBoxLayout newLeftToRight
add: textInput;
add: editButton
expand: false
fill: false
padding: 0;
yourself
]

{ #category : 'accessing' }
StPathBreadcrumbPresenter >> entityText [
^ textInput
Expand Down Expand Up @@ -108,7 +108,7 @@ StPathBreadcrumbPresenter >> initializePresenters [
isInEditMode
ifTrue: [ self pathTextChangedTo: self entityText text ]
ifFalse: [
self layout: self class editablelayout.
self layout: self editablelayout.
isInEditMode := isInEditMode not ] ]
]

Expand All @@ -126,5 +126,5 @@ StPathBreadcrumbPresenter >> pathTextChangedTo: aStringOrText [
ifTrue: [ self owner openFolder: fileReference ]
ifFalse: [ self inform: 'You have to input an existing path to a directory' ].
isInEditMode := false.
self layout: self class defaultLayout
self layout: self defaultLayout
]

0 comments on commit 463a4b5

Please sign in to comment.