Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.607.mcz ==================== Summary ==================== Name: Tools-topa.607 Author: topa Time: 27 April 2015, 12:20:45.852 am UUID: d055a92b-a4e1-4cf0-83b0-29c686c3f12f Ancestors: Tools-mt.606 Lose some hard-coded pixels and make the path/pattern offset-based (not fraction-based) =============== Diff against Tools-mt.606 =============== Item was changed: ----- Method: CodeHolder>>buttonHeight (in category 'toolbuilder') ----- buttonHeight + ^ Preferences standardButtonFont height * 2! - ^Preferences standardButtonFont height + 12! Item was changed: ----- Method: FileList>>buildFileListWith: (in category 'toolbuilder') ----- buildFileListWith: builder | buttons listSpec top | top := builder pluggablePanelSpec new. top children: OrderedCollection new. buttons := self buildButtonPaneWith: builder. buttons frame: (self topConstantHeightFrame: self buttonHeight fromLeft: 0 width: 1). top children add: buttons. listSpec := builder pluggableListSpec new. listSpec model: self ; list: #fileList ; getIndex: #fileListIndex ; setIndex: #fileListIndex: ; menu: #fileListMenu: ; keyPress: nil ; frame: (self + frameOffsetFromTop: self buttonHeight * 1.1 - frameOffsetFromTop: self buttonHeight + 4 fromLeft: 0 width: 1 bottomFraction: 1) ; color: Color white. SystemBrowser browseWithDragNDrop ifTrue: [ listSpec dragItem: #dragFromFileList: ]. top children add: listSpec. ^ top! Item was changed: ----- Method: FileList>>buildPatternInputWith: (in category 'toolbuilder') ----- buildPatternInputWith: builder | textSpec | textSpec := builder pluggableInputFieldSpec new. textSpec model: self; + font: self pathAndPatternFont; getText: #pathAndPattern; setText: #pathAndPattern:. ^textSpec ! Item was changed: ----- Method: FileList>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "FileList open" | windowSpec window | + windowSpec := self buildWindowWith: builder specs: { + (self topConstantHeightFrame: self pathAndPatternHeight + fromLeft: 0 + width: 1) -> [self buildPatternInputWith: builder]. + (self frameOffsetFromTop: self pathAndPatternHeight + fromLeft: 0.25 + width: 0.75 + bottomFraction: 0.5) -> [self buildFileListWith: builder]. + (self frameOffsetFromTop: self pathAndPatternHeight + fromLeft: 0 + width: 0.25 + bottomFraction: 1) -> [self buildDirectoryTreeWith: builder]. - windowSpec := self buildWindowWith: builder specs: { - (0@0 corner: 1@0.1) -> [self buildPatternInputWith: builder]. - (0.25@0.1 corner: 1@0.5) -> [self buildFileListWith: builder]. - (0@0.1 corner: 0.25@1) -> [self buildDirectoryTreeWith: builder]. (0.25@0.5 corner: 1@1) -> [self buildContentPaneWith: builder]. }. window := builder build: windowSpec. self changed: #selectedPath. ^window! Item was changed: ----- Method: FileList>>buttonHeight (in category 'toolbuilder') ----- buttonHeight + ^ Preferences standardButtonFont height * 2! - ^Preferences standardButtonFont height + 12! Item was added: + ----- Method: FileList>>pathAndPatternFont (in category 'toolbuilder') ----- + pathAndPatternFont + + ^ Preferences standardDefaultTextFont! Item was added: + ----- Method: FileList>>pathAndPatternHeight (in category 'toolbuilder') ----- + pathAndPatternHeight + " Take a whole font line and 50 % for space " + ^ (self pathAndPatternFont height * 1.5) ceiling! |
Free forum by Nabble | Edit this page |