mirror of
https://github.com/gwenhael-le-moine/x49gp.git
synced 2024-12-26 21:58:41 +01:00
fix direction of movement of pressed buttons
This commit is contained in:
parent
b87dfbd081
commit
440d6f75f8
1 changed files with 2 additions and 2 deletions
4
ui.c
4
ui.c
|
@ -775,7 +775,7 @@ x49gp_ui_button_pixmaps_init(x49gp_t *x49gp, x49gp_ui_button_t *button,
|
||||||
} else {
|
} else {
|
||||||
src = gdk_pixbuf_new_subpixbuf(ui->bg_pixbuf,
|
src = gdk_pixbuf_new_subpixbuf(ui->bg_pixbuf,
|
||||||
ui->kb_x_offset + button->key->x,
|
ui->kb_x_offset + button->key->x,
|
||||||
ui->kb_y_offset + button->key->y + 1,
|
ui->kb_y_offset + button->key->y - 1,
|
||||||
button->key->width,
|
button->key->width,
|
||||||
button->key->height);
|
button->key->height);
|
||||||
}
|
}
|
||||||
|
@ -1706,7 +1706,7 @@ x49gp_button_expose_event(GtkWidget *widget, GdkEventExpose *event,
|
||||||
y = widget->allocation.y;
|
y = widget->allocation.y;
|
||||||
|
|
||||||
if (GTK_WIDGET_STATE(widget) == GTK_STATE_ACTIVE)
|
if (GTK_WIDGET_STATE(widget) == GTK_STATE_ACTIVE)
|
||||||
y -= 1;
|
y += 1;
|
||||||
|
|
||||||
gdk_draw_drawable(widget->window, widget->style->black_gc,
|
gdk_draw_drawable(widget->window, widget->style->black_gc,
|
||||||
button->pixmap, 0, 0, x, y,
|
button->pixmap, 0, 0, x, y,
|
||||||
|
|
Loading…
Reference in a new issue