projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add clip folders, icon margins, fix safe regions, update neophyte, fix folder edl...
[goodguy/history.git]
/
cinelerra-5.1
/
guicast
/
bclistbox.C
diff --git
a/cinelerra-5.1/guicast/bclistbox.C
b/cinelerra-5.1/guicast/bclistbox.C
index 320e98bc4d701269e2fa636f02556a2bc4c419c6..16a477bbe309d0de365f9029675516f61a3f2487 100644
(file)
--- a/
cinelerra-5.1/guicast/bclistbox.C
+++ b/
cinelerra-5.1/guicast/bclistbox.C
@@
-656,8
+656,8
@@
void BC_ListBox::calculate_item_coords_recursive(
if( temp_display_format == LISTBOX_ICON_LIST ) {
for( int i=0; i<data[0].size(); ++i ) {
if( data[0].get(i)->icon ) {
if( temp_display_format == LISTBOX_ICON_LIST ) {
for( int i=0; i<data[0].size(); ++i ) {
if( data[0].get(i)->icon ) {
- i
f( data[0].get(i)->icon->get_h() > row_height )
-
row_height = data[0].get(i)->icon->get_h()
;
+ i
nt icon_h = data[0].get(i)->icon->get_h() + 2*ICON_MARGIN;
+
if( row_height < icon_h ) row_height = icon_h
;
}
}
}
}
}
}
@@
-1173,10
+1173,10
@@
int BC_ListBox::get_icon_mask(BC_ListBoxItem *item,
case LISTBOX_ICONS:
case LISTBOX_ICONS_PACKED:
case LISTBOX_ICON_LIST: {
case LISTBOX_ICONS:
case LISTBOX_ICONS_PACKED:
case LISTBOX_ICON_LIST: {
- x = get_item_x(item);
- y = get_item_y(item);
- w = get_icon_w(item) + ICON_MARGIN
* 2
;
- h = get_icon_h(item) + ICON_MARGIN
* 2
;
+ x = get_item_x(item)
+ ICON_MARGIN
;
+ y = get_item_y(item)
+ ICON_MARGIN
;
+ w = get_icon_w(item) + ICON_MARGIN;
+ h = get_icon_h(item) + ICON_MARGIN;
break; }
case LISTBOX_TEXT:
default: {
break; }
case LISTBOX_TEXT:
default: {
@@
-2135,6
+2135,14
@@
int BC_ListBox::get_cursor_item(ArrayList<BC_ListBoxItem*> *data, int cursor_x,
return -1;
}
return -1;
}
+// short version
+int BC_ListBox::get_cursor_item()
+{
+ int rx, ry;
+ gui->get_relative_cursor(rx, ry);
+ return get_cursor_item(data, rx, ry, 0, 0);
+}
+
int BC_ListBox::repeat_event(int64_t duration)
{
switch( current_operation ) {
int BC_ListBox::repeat_event(int64_t duration)
{
switch( current_operation ) {
@@
-2695,7
+2703,6
@@
int BC_ListBox::button_press_event()
int BC_ListBox::button_release_event()
{
int result = 0;
int BC_ListBox::button_release_event()
{
int result = 0;
- int cursor_x, cursor_y;
int do_event = 0;
new_value = 0;
unset_scroll_repeat();
int do_event = 0;
new_value = 0;
unset_scroll_repeat();
@@
-2718,11
+2725,7
@@
int BC_ListBox::button_release_event()
//printf("BC_ListBox::button_release_event 10\n");
current_operation = NO_OPERATION;
if( gui ) {
//printf("BC_ListBox::button_release_event 10\n");
current_operation = NO_OPERATION;
if( gui ) {
- translate_coordinates(top_level->event_win, gui->win,
- gui->get_cursor_x(), gui->get_cursor_y(),
- &cursor_x, &cursor_y);
- selection_number1 = selection_number =
- get_cursor_item(data, cursor_x, cursor_y);
+ selection_number1 = selection_number = get_cursor_item();
//printf("BC_ListBox::button_release_event %d %d\n", selection_number2, selection_number1);
}
//printf("BC_ListBox::button_release_event %d %d\n", selection_number2, selection_number1);
}