[GB.GTK]
* NEW: GTK+3 support continues... git-svn-id: svn://localhost/gambas/trunk@6048 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
492e4ea979
commit
19bc16f26b
5 changed files with 16 additions and 18 deletions
|
@ -365,16 +365,8 @@ END_METHOD
|
|||
|
||||
BEGIN_METHOD_VOID(CMENU_clear)
|
||||
|
||||
gMenu *mn;
|
||||
int i, max;
|
||||
|
||||
max = MENU->childCount();
|
||||
|
||||
for (i = 0; i < max; i++)
|
||||
{
|
||||
mn = MENU->childMenu(i);
|
||||
delete_menu(mn);
|
||||
}
|
||||
while (MENU->childCount())
|
||||
delete_menu(MENU->childMenu(0));
|
||||
|
||||
THIS->init_shortcut = FALSE;
|
||||
|
||||
|
|
|
@ -621,9 +621,9 @@ __FOUND_WIDGET:
|
|||
case GDK_SCROLL:
|
||||
|
||||
save_control = control = find_child(control, (int)event->scroll.x_root, (int)event->scroll.y_root);
|
||||
|
||||
|
||||
__SCROLL_TRY_PROXY:
|
||||
|
||||
|
||||
if (control->onMouseEvent && control->canRaise(control, gEvent_MouseWheel))
|
||||
{
|
||||
int dir, dt, ort;
|
||||
|
@ -639,14 +639,16 @@ __FOUND_WIDGET:
|
|||
#ifdef GTK3
|
||||
if (dir == GDK_SCROLL_SMOOTH)
|
||||
{
|
||||
gdouble dx = 0, dy = 0;
|
||||
/*gdouble dx = 0, dy = 0;
|
||||
gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy);
|
||||
if (fabs(dy) > fabs(dx))
|
||||
dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||
else
|
||||
dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;
|
||||
dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;*/
|
||||
goto __HANDLE_EVENT;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case GDK_SCROLL_DOWN: dt = -1; ort = 1; break;
|
||||
|
|
|
@ -449,7 +449,7 @@ void gFont::setGrade(int grade)
|
|||
{
|
||||
double desktop = gDesktop::font()->size();
|
||||
|
||||
if (grade < -4 || grade > 16)
|
||||
if (grade < -4 || grade > 24)
|
||||
return;
|
||||
|
||||
setSize(GRADE_TO_SIZE(grade, desktop));
|
||||
|
|
|
@ -194,6 +194,9 @@ static void cb_scroll(GtkWidget *wid, GdkEvent *event, gTabStrip *data)
|
|||
int page;
|
||||
|
||||
if (dir == GDK_SCROLL_SMOOTH)
|
||||
return;
|
||||
|
||||
/*
|
||||
{
|
||||
gdouble dx = 0, dy = 0;
|
||||
gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy);
|
||||
|
@ -201,7 +204,7 @@ static void cb_scroll(GtkWidget *wid, GdkEvent *event, gTabStrip *data)
|
|||
dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||
else
|
||||
dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;
|
||||
}
|
||||
}*/
|
||||
|
||||
page = gtk_notebook_get_current_page(GTK_NOTEBOOK(data->widget));
|
||||
|
||||
|
|
|
@ -132,14 +132,15 @@ static gboolean cb_scroll(GtkStatusIcon *plug, GdkEventScroll *event, gTrayIcon
|
|||
|
||||
#ifdef GTK3
|
||||
if (dir == GDK_SCROLL_SMOOTH)
|
||||
{
|
||||
return false;
|
||||
/*{
|
||||
gdouble dx = 0, dy = 0;
|
||||
gdk_event_get_scroll_deltas((GdkEvent *)event, &dx, &dy);
|
||||
if (fabs(dy) > fabs(dx))
|
||||
dir = (dy < 0) ? GDK_SCROLL_UP : GDK_SCROLL_DOWN;
|
||||
else
|
||||
dir = (dx < 0) ? GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
|
||||
switch (dir)
|
||||
|
|
Loading…
Reference in a new issue