[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No borders around images under cursor

From: Juri Linkov
Subject: No borders around images under cursor
Date: Wed, 08 Jun 2005 23:57:32 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

When the cursor type is `bar', putting the cursor over an image has
no visual indication.  This can be considered a bug when moving the
cursor in the Face Customization buffer over rows of face attributes
vertically on the column with checkbox images has no visual feedback
on cursor motion at all.
This behavior is observable only with small font sizes.  With bigger
font sizes there is a visible border line only on the top of the image.
With very big fonts there is a thick line above the image and a thin
line at the bottom.

So perhaps when the cursor type is `bar', the image should have
a border only on the left, by analogy with the cursor on characters:
the cursor type `box' inverts the colors on the whole character,
while `bar' displays a bar on the left of the character.

There are also differences in cursor display on transparent images.
`box' displays all borders around the transparent image, but `bar'
fills the transparent parts with the cursor colors.  Perhaps it should
display a border on the left.

BTW, there is a function `set-cursor-color' in frames.el, but its
counterpart function `set-cursor-type' is missing.  The following
patch fills this omission:

Index: lisp/frame.el
RCS file: /cvsroot/emacs/emacs/lisp/frame.el,v
retrieving revision 1.221
diff -u -r1.221 frame.el
--- lisp/frame.el       19 May 2005 15:40:37 -0000      1.221
+++ lisp/frame.el       8 Jun 2005 22:14:34 -0000
@@ -908,6 +908,16 @@
   (modify-frame-parameters (selected-frame)
                           (list (cons 'cursor-color color-name))))
+(defun set-cursor-type (cursor-type)
+  "Set the text cursor type of the selected frame to CURSOR-TYPE.
+When called interactively, prompt for the name of the type to use.
+To get the frame's current cursor type, use `frame-parameters'."
+  (interactive (list (intern (completing-read "Cursor type: "
+                                             '("box" "hollow" "bar" "hbar")
+                                             nil t))))
+  (modify-frame-parameters (selected-frame)
+                          (list (cons 'cursor-type cursor-type))))
 (defun set-mouse-color (color-name)
   "Set the color of the mouse pointer of the selected frame to COLOR-NAME.
 When called interactively, prompt for the name of the color to use.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]