drag win rework, new search, igor theme fixes, sams preset icon
[goodguy/history.git] / cinelerra-5.1 / guicast / bclistbox.C
index e85cb599d00915743081ba8eeab9fe3351c4401b..88afc836f39d9317b1856cfea66aaa02446918e6 100644 (file)
@@ -3126,22 +3126,15 @@ int BC_ListBox::drag_start_event()
                                int cx, cy;
                                get_abs_cursor(cx, cy);
                                if( item_return->icon_vframe ) {
-                                       cx -= item_return->icon_vframe->get_w() / 2,
-                                       cy -= item_return->icon_vframe->get_h() / 2;
                                        drag_popup = new BC_DragWindow(this,
                                                item_return->icon_vframe, cx, cy);
                                }
                                else
-// this probably works not!
                                if( item_return->icon ) {
-                                       cx -= item_return->icon->get_w() / 2,
-                                       cy -= item_return->icon->get_h() / 2;
                                        drag_popup = new BC_DragWindow(this,
                                                item_return->icon, cx, cy);
                                }
                                else {
-                                       cx -= drag_icon_vframe->get_w() / 2,
-                                       cy -= drag_icon_vframe->get_h() / 2;
                                        drag_popup = new BC_DragWindow(this,
                                                drag_icon_vframe, cx, cy);
                                }
@@ -3229,9 +3222,9 @@ int BC_ListBox::drag_stop_event()
                        if( display_format == LISTBOX_ICONS ) {
                                reposition_item(data,
                                        selection_number,
-                                       top_level->cursor_x + drag_popup->get_offset_x() -
+                                       top_level->cursor_x - drag_popup->get_w() / 2 -
                                                LISTBOX_MARGIN - 2 + xposition,
-                                       top_level->cursor_y + drag_popup->get_offset_y() -
+                                       top_level->cursor_y - drag_popup->get_h() / 2 -
                                                LISTBOX_MARGIN - 2 + yposition);
                        }
                        else