A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-fbs.230.mcz ==================== Summary ==================== Name: Tools-fbs.230 Author: fbs Time: 22 April 2010, 9:54:48.949 pm UUID: 4a36ba23-1a81-244e-9236-0a269666811a Ancestors: Tools-ar.228 Constant-height button and input field for MessageNames. =============== Diff against Tools-ar.228 =============== Item was added: + ----- Method: MessageNames>>searchPaneFrame: (in category 'toolbuilder') ----- + searchPaneFrame: height + ^LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: 0; + rightFraction: 0.5 offset: 0; + bottomFraction: 0 offset: height.! Item was changed: ----- Method: MessageNames>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "ToolBuilder open: MessageNames new" + | windowSpec max result | - | windowSpec max buttonSpec result | max := self wantsOptionalButtons ifTrue:[0.42] ifFalse:[0.5]. windowSpec := self buildWindowWith: builder specs: { + (self searchPaneFrame: self buttonHeight) -> [self buildSearchPaneWith: builder]. + (self selectorListFrame: max fromTop: self buttonHeight) -> [self buildSelectorListWith: builder]. - (0.15@0 corner: 0.5@0.08) -> [self buildSearchPaneWith: builder]. - (0@0.08 corner: 0.5@max) -> [self buildSelectorListWith: builder]. (0.5@0.0 corner: 1.0@max) -> [self buildMessageListWith: builder]. (0@max corner: 1@1) -> [self buildCodePaneWith: builder]. }. - buttonSpec := builder pluggableActionButtonSpec new. - buttonSpec - model: self; - label: 'Search'; - action: [self doSearchFrom: searchPane]; - frame: (0.0@0 corner: 0.15@0.08). - windowSpec children add: buttonSpec. - result := builder build: windowSpec. searchPane := builder widgetAt: #search. ^result! Item was added: + ----- Method: MessageNames>>selectorListFrame:fromTop: (in category 'toolbuilder') ----- + selectorListFrame: max fromTop: topOffset + ^LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: topOffset; + rightFraction: 0.5 offset: 0; + bottomFraction: max offset: 0.! Item was changed: ----- Method: MessageNames>>buildSearchPaneWith: (in category 'toolbuilder') ----- buildSearchPaneWith: builder + | buttonFrame buttonSpec textFrame textSpec top | + top := builder pluggablePanelSpec new. + top children: OrderedCollection new. + + buttonFrame := LayoutFrame new + leftFraction: 0 offset: 0; + topFraction: 0 offset: 0; + rightFraction: 0.3 offset: 0; + bottomFraction: 1 offset: 0; + yourself. + textFrame := LayoutFrame new + leftFraction: 0.3 offset: 1; + topFraction: 0 offset: 0; + rightFraction: 1 offset: 0; + bottomFraction: 1 offset: 0; + yourself. + + buttonSpec := builder pluggableActionButtonSpec new. + buttonSpec + model: self; + label: 'Search'; + action: [self doSearchFrom: searchPane]; + frame: buttonFrame. + top children add: buttonSpec. + - | textSpec | textSpec := builder pluggableInputFieldSpec new. textSpec model: self; name: #search; getText: #searchString; + setText: #searchString:notifying:; + frame: textFrame. + top children add: textSpec. + + ^top! - setText: #searchString:notifying:. - ^textSpec! |
On 2010/04/22 20:04, [hidden email] wrote:
> A new version of Tools was added to project The Inbox: > http://source.squeak.org/inbox/Tools-fbs.230.mcz > > ==================== Summary ==================== > > Name: Tools-fbs.230 > Author: fbs > Time: 22 April 2010, 9:54:48.949 pm > UUID: 4a36ba23-1a81-244e-9236-0a269666811a > Ancestors: Tools-ar.228 > > Constant-height button and input field for MessageNames. This commit, and Tools-fbs.229, share some commonalities. I chose to leave them independent with the idea being - if both are accepted - of refactoring the common frame stuff. In particular, MessageNames>>searchPaneFrame: is almost like Browser>>topConstantHeightFrame:fromLeft:width:. frank |
On 4/22/2010 1:10 PM, Frank Shearar wrote:
> This commit, and Tools-fbs.229, share some commonalities. I chose to > leave them independent with the idea being - if both are accepted - of > refactoring the common frame stuff. Thank you for your thoughtful consideration. I think that at this point we all buy into fixed-height buttons :-) So please go ahead and refactor things into shape as you see fit. Cheers, - Andreas > In particular, MessageNames>>searchPaneFrame: is almost like > Browser>>topConstantHeightFrame:fromLeft:width:. > > frank > > |
Free forum by Nabble | Edit this page |