minimumEditorHeight
authorca
Tue, 05 Aug 2008 16:08:15 +0200
changeset 3524 854b6484c001
parent 3523 26c2bafdd0fb
child 3525 f213672ac51f
minimumEditorHeight
SelectionInListModelView.st
--- a/SelectionInListModelView.st	Tue Aug 05 15:59:55 2008 +0200
+++ b/SelectionInListModelView.st	Tue Aug 05 16:08:15 2008 +0200
@@ -20,7 +20,7 @@
 		dropSource editorView openEditorAction closeEditorAction
 		highlightEnterItem enterItem cursorItem lineMask keyActionStyle
 		returnKeyActionStyle strikeOut modelChangedDuringButtonPress
-		selectOnButtonPress selectOnMenuButton'
+		selectOnButtonPress selectOnMenuButton minimumEditorHeight'
 	classVariableNames:'DefaultHilightStyle DefaultHilightBackgroundColor
 		DefaultHilightForegroundColor DefaultHilightLevel
 		DefaultHilightFrameColor'
@@ -626,6 +626,20 @@
     ^ editorView notNil
 !
 
+minimumEditorHeight
+    "answer the minumium height of the editor or nil.
+     If the height is nil the height of the line is used"
+
+    ^ minimumEditorHeight
+!
+
+minimumEditorHeight:aHeightOrNil
+    "set the minumium height of the editor or nil.
+     If the height is nil the height of the line is used"
+
+    minimumEditorHeight := aHeightOrNil.
+!
+
 openEditor
     "opens the editor on the current selection;
      returns the editorView or nil if no openEditorAction is defined
@@ -2050,6 +2064,9 @@
     x := (self xVisibleOfItem:item) - (textStartLeft // 2).
     h := self yVisibleOfLine:(lnNr + 1).
 
+    minimumEditorHeight notNil ifTrue:[
+        minimumEditorHeight := h max:minimumEditorHeight.
+    ].
     "/ Changed by cg:
     "/ editorView layout:( Rectangle left:x top:y right:(width - 1 - margin) bottom:(h + 2 "- 1") ).
     editorView layout:( Rectangle left:x top:y-2 right:(width - 1 - margin) bottom:(h "- 1") ).
@@ -2528,5 +2545,5 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.136 2008-07-18 09:40:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.137 2008-08-05 14:08:15 ca Exp $'
 ! !