* BUG: The MouseDrag event can be cancelled now, like with gb.qt4.

[GB.GTK3]
* BUG: The MouseDrag event can be cancelled now, like with gb.qt4.


git-svn-id: svn://localhost/gambas/trunk@6105 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-01-26 23:23:35 +00:00
parent 7b6ef84f3c
commit 52479d72c9
2 changed files with 6 additions and 8 deletions

View file

@ -544,9 +544,7 @@ static void style_panel(int x, int y, int w, int h, int border, int state)
default: shadow = GTK_SHADOW_NONE;
}
gtk_paint_shadow(style, _dr,
st, shadow, get_area(), NULL, NULL,
x, y, w, h);
gtk_paint_shadow(style, _dr, st, shadow, get_area(), NULL, NULL, x, y, w, h);
if (border == BORDER_PLAIN)
{

View file

@ -610,11 +610,11 @@ __FOUND_WIDGET:
cancel = control->onMouseEvent(control, gEvent_MouseMove);
//if (data->acceptDrops() && gDrag::checkThreshold(data, gMouse::x(), gMouse::y(), gMouse::startX(), gMouse::startY()))
if ((event->motion.state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK))
if (!cancel && (event->motion.state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK))
//&& (abs(gMouse::x() - gMouse::y()) + abs(gMouse::startX() - gMouse::startY())) > 8)
&& gDrag::checkThreshold(control, gMouse::x(), gMouse::y(), gMouse::startX(), gMouse::startY()))
{
control->onMouseEvent(control, gEvent_MouseDrag);
cancel = control->onMouseEvent(control, gEvent_MouseDrag);
}
gMouse::invalidate();
@ -1332,7 +1332,7 @@ int gApplication::getScrollbarSpacing()
int gApplication::getInnerWidth()
{
if (strcmp(getStyleName(), "oxygen-gtk") == 0)
return 2;
return 1;
else
return 0;
}
@ -1346,12 +1346,12 @@ int gApplication::getFrameWidth()
GtkBorder border;
gtk_style_context_get_padding(context, (GtkStateFlags)0, &tmp);
gtk_style_context_get_border(context, (GtkStateFlags)0, &border);
/*gtk_style_context_get_border(context, (GtkStateFlags)0, &border);
tmp.top += border.top;
tmp.right += border.right;
tmp.bottom += border.bottom;
tmp.left += border.left;
tmp.left += border.left;*/
w = MIN(tmp.top, tmp.left);
w = MIN(w, tmp.bottom);