diff --git a/core/mui/cairo_icon_over_button.rb b/core/mui/cairo_icon_over_button.rb index 5c42745..c86caa2 100644 --- a/core/mui/cairo_icon_over_button.rb +++ b/core/mui/cairo_icon_over_button.rb @@ -58,6 +58,7 @@ module Gdk::IconOverButton # - _gy_MiraclePainter 全体から見たy座標 def point_moved_main_icon(gx, gy) icon_position = globalpos2iconpos(gx, gy) + @tree.pointer_on_main_icon = !!icon_position if icon_position if current_icon_pos != icon_position on_modify diff --git a/core/mui/gtk_tree_view_pretty_scroll.rb b/core/mui/gtk_tree_view_pretty_scroll.rb index 539a602..f7876f4 100644 --- a/core/mui/gtk_tree_view_pretty_scroll.rb +++ b/core/mui/gtk_tree_view_pretty_scroll.rb @@ -11,6 +11,7 @@ module Gtk::TreeViewPrettyScroll def initialize(*a) super + pointer_on_main_icon = false # メインアイコン上にポインタがあるなら真 scroll_to_top_animation = false # 自動スクロールアニメーション中なら真 get_scroll_to_top_animation_id = 0 scroll_to_top_animation_id = lambda{ @@ -45,7 +46,19 @@ module Gtk::TreeViewPrettyScroll def scroll_to_zero_lator! @scroll_to_zero_lator = true end + def pointer_on_main_icon + atomic { + @pointer_on_main_icon + } + end + + def pointer_on_main_icon=(v) + atomic { + @pointer_on_main_icon = v + } + end + def scroll_to_zero? - defined?(@scroll_to_zero_lator) and @scroll_to_zero_lator end + !pointer_on_main_icon and defined?(@scroll_to_zero_lator) and @scroll_to_zero_lator end end