プロジェクト

全般

プロフィール

バグ #1527 » 0001-gtk3-change-pointer-2.patch

Izumi Tsutsui, 2021-11-03 02:53

差分を表示:

plugin/gtk3/widget/miraclepainter.rb
textselector_select(*main_pos_to_index_forclick(x, y)[1..2])
# change cursor shape
window.cursor = Gdk::Cursor.new(cursor_name_of(x, y))
set_cursor(cursor_name_of(x, y))
false # propagate event
end
......
iob_main_leave
textselector_release
# restore cursor shape
window.cursor = nil
set_cursor('default')
false # propagate event
end
......
end
end
# _name_ に対応するマウスカーソルに変更する。
# ==== Args
# [name] カーソルの名前(String)
private def set_cursor(name)
type =
case name
when 'pointer'
:hand2
when 'text'
:xterm
else
:left_ptr
end
window.cursor = Gdk::Cursor.new(type)
self
end
def gb_foot
self.class.gb_foot
end
(3-3/3)