[3298] Fixed color of the menu

This commit is contained in:
claudiol 2018-08-28 12:32:03 -04:00
parent f5c6457a1e
commit 4adb8c7db7

View file

@ -122,6 +122,7 @@ x49gp_lcd_update(x49gp_t *x49gp)
x49gp_ui_t *ui = x49gp->ui;
s3c2410_lcd_t *lcd = x49gp->s3c2410_lcd;
GdkRectangle rect;
GdkGC *gc;
int color, x, y;
if (!(lcd->lcdcon1 & 1)) {
@ -161,16 +162,19 @@ x49gp_lcd_update(x49gp_t *x49gp)
gdk_gc_set_rgb_fg_color(ui->ann_busy_gc, &(ui->colors[UI_COLOR_GRAYSCALE_0 + color]));
gdk_draw_rectangle(ui->lcd_pixmap, ui->ann_busy_gc, TRUE, 191, 0, 15, 12);
gc = gdk_gc_new(ui->lcd_canvas->window);
for (y = 0; y < (ui->lcd_height - ui->lcd_top_margin) / 2; y++) {
for (x = 0; x < ui->lcd_width / 2; x++) {
color = x49gp_get_pixel_color(lcd, x, y);
gdk_gc_set_rgb_fg_color(ui->window->style->fg_gc[0],
&(ui->colors[UI_COLOR_GRAYSCALE_0 + color]));
gdk_draw_rectangle(ui->lcd_pixmap, ui->window->style->fg_gc[0], TRUE,
2 * x, 2 * y + ui->lcd_top_margin, 2, 2);
gdk_gc_set_rgb_fg_color(gc, &(ui->colors[UI_COLOR_GRAYSCALE_0 + color]));
gdk_draw_rectangle(ui->lcd_pixmap, gc, TRUE,
2 * x, 2 * y + ui->lcd_top_margin, 2, 2);
}
}
g_object_unref(gc);
done:
rect.x = 0;
rect.y = 0;