# HG changeset patch # User Claus Gittinger # Date 860659304 -7200 # Node ID 6fa9c1f0556448a8684cc7b2fc40c5225331f589 # Parent 8d674e606a94e2ca5184673d1faddf37d50622ad fontPanels actionblock passes a fontDescription diff -r 8d674e606a94 -r 6fa9c1f05564 UIPainterView.st --- a/UIPainterView.st Tue Apr 08 20:19:05 1997 +0200 +++ b/UIPainterView.st Thu Apr 10 10:01:44 1997 +0200 @@ -829,20 +829,23 @@ ! showFontPanel - |action| + |action theFont| fontPanel isNil ifTrue:[ - fontPanel := FontPanel new + fontPanel := FontPanel new ]. selection notNil ifTrue:[ - action := [:family :face :style :size | - self changeFontFamily:family face:face - style:style size:size - ]. - fontPanel action:action. - fontPanel showAtPointer + action := [:aFontDescription | theFont := aFontDescription]. + fontPanel action:action. + fontPanel showAtPointer. + fontPanel destroy. + theFont notNil ifTrue:[ + self changeFont:theFont + ] ] + + "Modified: 10.4.1997 / 09:55:43 / cg" ! subMenuAlign @@ -995,6 +998,29 @@ !UIPainterView methodsFor:'misc'! +changeFont:aFontDescription + |f| + + f := aFontDescription onDevice:device. +"/ f := Font family:family +"/ face:face +"/ style:style +"/ size:size. + + f notNil ifTrue:[ + self withSelectionHiddenDo:[ + self selectionDo:[:aView | + aView font:f. + self elementChangedSize:aView. + ] + ]. + self changed:#any. + ] + + "Modified: 5.9.1995 / 12:13:27 / claus" + "Created: 10.4.1997 / 09:56:16 / cg" +! + changeFontFamily:family face:face style:style size:size |f|