MiniScroller.st
changeset 1114 ddd752f834d5
parent 968 ba32bbfb7aad
child 1116 e4a28d306bd7
equal deleted inserted replaced
1113:c0933ddd159d 1114:ddd752f834d5
    56         thumbEdgeStyle := nil.
    56         thumbEdgeStyle := nil.
    57         thumbLevel := thumbActiveLevel := 2.
    57         thumbLevel := thumbActiveLevel := 2.
    58     ].
    58     ].
    59     ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
    59     ((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[
    60         style == #st80 ifTrue:[
    60         style == #st80 ifTrue:[
    61             lvl := 1.
    61             "/ lvl := 1.
       
    62             lvl := 0.
    62         ] ifFalse:[
    63         ] ifFalse:[
    63             lvl := -1.
    64             lvl := -1.
    64         ].
    65         ].
    65         self level:lvl.
    66         self level:lvl.
    66         self borderWidth:0
    67         self borderWidth:0
    67     ].
    68     ].
    68     shadowForm := lightForm := nil.
    69     shadowForm := lightForm := nil.
    69     fixThumbHeight := false
    70     fixThumbHeight := false
    70 
    71 
    71     "Modified: 22.1.1997 / 11:57:30 / cg"
    72     "Modified: 7.3.1997 / 15:52:13 / cg"
    72 !
    73 !
    73 
    74 
    74 initialize
    75 initialize
    75     "initialize - setup instvars from defaults"
    76     "initialize - setup instvars from defaults"
    76 
    77 
    90     preferredExtent notNil ifTrue:[
    91     preferredExtent notNil ifTrue:[
    91         ^ preferredExtent
    92         ^ preferredExtent
    92     ].
    93     ].
    93 
    94 
    94     defExt := self class defaultExtent.
    95     defExt := self class defaultExtent.
       
    96 
    95     mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
    97     mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0].
       
    98     w := defExt x.
       
    99     h := defExt y.
       
   100 
       
   101     styleSheet name == #st80 ifTrue:[
       
   102         mm := 2.5
       
   103     ].
    96     orientation == #vertical ifTrue:[
   104     orientation == #vertical ifTrue:[
    97         h := defExt y.
       
    98         w := (device horizontalPixelPerMillimeter asFloat * mm) rounded.
   105         w := (device horizontalPixelPerMillimeter asFloat * mm) rounded.
    99     ] ifFalse:[
   106     ] ifFalse:[
   100         w := defExt x.
       
   101         h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
   107         h := (device verticalPixelPerMillimeter asFloat * mm) rounded.
   102     ].
   108     ].
       
   109 
   103     preferredExtent := w @ h.
   110     preferredExtent := w @ h.
   104     ^ preferredExtent.
   111     ^ preferredExtent.
   105 
   112 
   106     "Modified: 19.7.1996 / 20:46:21 / cg"
   113     "Modified: 7.3.1997 / 16:02:15 / cg"
   107 ! !
   114 ! !
   108 
   115 
   109 !MiniScroller class methodsFor:'documentation'!
   116 !MiniScroller class methodsFor:'documentation'!
   110 
   117 
   111 version
   118 version
   112     ^ '$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.14 1997-01-22 17:24:23 cg Exp $'
   119     ^ '$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.15 1997-03-07 15:02:24 cg Exp $'
   113 ! !
   120 ! !