[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: [1.99] customize-face



>>>>> In [meadow-users-jp : No.4349] 
>>>>>	ari@xxxxxxxxxxxxxxxx (ARISAWA Akihiro) wrote:

ari> ひょっとして、単に image のデータに bool-vector がまだ(?)サポート
ari> されていないというだけでしょうか。

現在は各形式の画像ファイルそのまましかサポートされていないということで
しょうか。

ari> なお、Emacs-21.3.50 の以下の変更をマージしてみたところ、落ちなくは
ari> なりました。期待する画像は表示されませんでしたが…。

XBM のデータを文字列で渡すと、サポートはされてないので表示されないけど、
対応しているデータと型は合っているので落ちはしないとなっている気がしま
した。


XBM file の形式で指定すると問題無いので、とりあえずは以下の設定で回避
しています。

(eval-after-load "wid-edit"
  '(define-widget 'checkbox 'toggle
  "A checkbox toggle."
  :button-suffix ""
  :button-prefix ""
  :format "%[%v%]"
  :on "[X]"
  :on-glyph (create-image "\
#define x_width 7
#define x_height 7
static char x_bits[] = {
0xff,0xc9,0xc1,0xe3,0xc1,0xc9,0xff};"
			  'xbm t :width 7 :height 7
			  :background "grey75"
			  :foreground "black"
			  :relief -3
			  :ascent 'center)
  :off "[ ]"
  :off-glyph (create-image "\
#define x_width 7
#define x_height 7
static char x_bits[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff};"
			   'xbm t :width 7 :height 7
			   :background "grey75"
			   :foreground "black"
			   :relief 3
			   :ascent 'center)
  :help-echo "Toggle this item."
  :action 'widget-checkbox-action))

-- 
有沢 明宏