Changeset 7495


Ignore:
Timestamp:
Oct 22, 2007, 9:15:34 PM (14 years ago)
Author:
rme
Message:

I'm going to go ahead and commit this, even though I'm not happy with it.

I removed an old workarond for what appears to have been a Carbon bug
of some sort, so if something blows up, I guess that's a prime candidate
for examination.

I'm almost convinced that it would be advantageous to make nib
files for editor and listener windows, just so that it's easier to
get all the details right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/cocoa-ide/cocoa-editor.lisp

    r7493 r7495  
    12321232
    12331233
    1234 (def-cocoa-default *modeline-font-name* :string "Courier New Bold Italic"
     1234(def-cocoa-default *modeline-font-name* :string "Monaco"
    12351235                   "Name of font to use in modelines")
    1236 (def-cocoa-default  *modeline-font-size* :float 10.0 "Size of font to use in modelines")
     1236(def-cocoa-default  *modeline-font-size* :float 9.0 "Size of font to use in modelines")
    12371237
    12381238
     
    12541254      (when buffer
    12551255        ;; You donn't want to know why this is done this way.
     1256        ;; Sure I do.  Let's see what happens.
     1257        #+nil
    12561258        (when (%null-ptr-p text-attributes)
    12571259          (setq text-attributes
    1258                 (create-text-attributes :color (#/blackColor ns:ns-color)
     1260                (create-text-attributes :color (#/whiteColor ns:ns-color)
    12591261                                        :font (default-font
    1260                                                   :name *modeline-font-name*
     1262                                                :name *modeline-font-name*
    12611263                                                :size *modeline-font-size*))))
     1264        (unless (%null-ptr-p text-attributes)
     1265          (#/release text-attributes))
     1266        (setq text-attributes
     1267              (create-text-attributes :color (#/whiteColor ns:ns-color)
     1268                                      :font (default-font
     1269                                              :name *modeline-font-name*
     1270                                              :size *modeline-font-size*)))
    12621271        (let* ((string
    12631272                (apply #'concatenate 'string
     
    12661275                            (funcall (hi::modeline-field-function field)
    12671276                                     buffer pane))
    1268                         (hi::buffer-modeline-fields buffer)))))
     1277                        (hi::buffer-modeline-fields buffer))))
     1278               (s (%make-nsstring string))
     1279               (view-height (ns:ns-rect-height (#/frame the-modeline-view)))
     1280               (size (#/sizeWithAttributes: s text-attributes))
     1281               (string-height (ns:ns-size-height size))
     1282               (y (- view-height string-height)))
     1283          (if (minusp y)
     1284            (setq y 0.0)
     1285            (setq y (/ y 2.0)))
    12691286          (#/drawAtPoint:withAttributes: (%make-nsstring string)
    1270                                          (ns:make-ns-point 0 0)
     1287                                         (ns:make-ns-point 2 y)
    12711288                                         text-attributes))))))
    12721289
     
    12751292(objc:defmethod (#/drawRect: :void) ((self modeline-view) (rect :<NSR>ect))
    12761293  (declare (ignorable rect))
    1277   (let* ((frame (#/bounds self)))
    1278      (#_NSDrawWhiteBezel frame frame)
    1279      (draw-modeline-string self)))
     1294  (let* ((frame (#/bounds self))
     1295         (path (#/bezierPath ns:ns-bezier-path)))
     1296    (#/set (#/blackColor ns:ns-color))
     1297    (#_NSRectFill frame)
     1298    (draw-modeline-string self)))
    12801299
    12811300;;; Hook things up so that the modeline is updated whenever certain buffer
     
    15501569
    15511570(defun make-echo-area (the-hemlock-frame x y width height gap-context color)
    1552   (let* ((box (make-instance 'ns:ns-view :with-frame (ns:make-ns-rect x y width height))))
     1571  (let* ((color-list (#/colorListNamed: ns:ns-color-list #@"System"))
     1572         (color (#/colorWithKey: color-list #@"windowBackgroundColor"))
     1573         (box (make-instance 'ns:ns-view :with-frame (ns:make-ns-rect x y width height))))
    15531574    (#/setAutoresizingMask: box #$NSViewWidthSizable)
    15541575    (let* ((box-frame (#/bounds box))
Note: See TracChangeset for help on using the changeset viewer.