Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move edit path button close to the path #705

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
]