[dia/dia-next: 5/59] Fix some colour related fallout
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/dia-next: 5/59] Fix some colour related fallout
- Date: Wed, 9 Jan 2019 18:34:43 +0000 (UTC)
commit 175c0fb4c78aa6bb62c599e0e6e6d5fd4da76234
Author: Zander Brown <zbrown gnome org>
Date: Mon Dec 10 23:07:56 2018 +0000
Fix some colour related fallout
app/color_area.c | 6 +++---
app/diapagelayout.c | 8 ++++----
app/linewidth_area.c | 4 ++--
app/ruler.c | 4 ++--
lib/arrows.c | 2 +-
lib/pattern.h | 4 +++-
lib/prop_text.c | 2 +-
lib/textattr.h | 2 ++
8 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/app/color_area.c b/app/color_area.c
index 006e75e5..a904af57 100644
--- a/app/color_area.c
+++ b/app/color_area.c
@@ -128,11 +128,11 @@ color_area_draw (cairo_t *color_area_ctx)
rect_w = width * 0.65;
rect_h = height * 0.65;
- gdk_cairo_set_source_color (color_area_ctx, win_bg);
+ gdk_cairo_set_source_rgba (color_area_ctx, win_bg);
cairo_rectangle (color_area_ctx, 0, 0, width, height);
cairo_fill (color_area_ctx);
- gdk_cairo_set_source_color (color_area_ctx, &bg);
+ gdk_cairo_set_source_rgba (color_area_ctx, &bg);
cairo_rectangle (color_area_ctx,
(width - rect_w), (height - rect_h), rect_w, rect_h);
@@ -151,7 +151,7 @@ color_area_draw (cairo_t *color_area_ctx)
(width - rect_w), (height - rect_h),
rect_w, rect_h);
- gdk_cairo_set_source_color (color_area_ctx, &fg);
+ gdk_cairo_set_source_rgba (color_area_ctx, &fg);
cairo_rectangle (color_area_ctx, 0, 0, rect_w, rect_h);
cairo_fill (color_area_ctx);
diff --git a/app/diapagelayout.c b/app/diapagelayout.c
index dd0fe0f6..38c0348b 100644
--- a/app/diapagelayout.c
+++ b/app/diapagelayout.c
@@ -625,17 +625,17 @@ darea_expose_event(DiaPageLayout *self, GdkEventExpose *event)
cairo_fill (ctx);
/* draw the page image */
- gdk_cairo_set_source_color (ctx, &self->black);
+ gdk_cairo_set_source_rgba (ctx, &self->black);
cairo_rectangle(ctx, self->x+3, self->y+3, self->width, self->height);
cairo_fill (ctx);
- gdk_cairo_set_source_color (ctx, &self->white);
+ gdk_cairo_set_source_rgba (ctx, &self->white);
cairo_rectangle (ctx, self->x, self->y, self->width, self->height);
cairo_fill (ctx);
- gdk_cairo_set_source_color (ctx, &self->black);
+ gdk_cairo_set_source_rgba (ctx, &self->black);
cairo_rectangle (ctx, self->x + 1, self->y, self->width, self->height);
cairo_stroke (ctx);
- gdk_cairo_set_source_color (ctx, &self->blue);
+ gdk_cairo_set_source_rgba (ctx, &self->blue);
/* draw margins */
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->orient_portrait))) {
diff --git a/app/linewidth_area.c b/app/linewidth_area.c
index d9a0c687..c503c0dc 100644
--- a/app/linewidth_area.c
+++ b/app/linewidth_area.c
@@ -89,11 +89,11 @@ linewidth_area_draw (GtkWidget *linewidth_area)
win_bg = &(style->bg[GTK_STATE_NORMAL]);
win_fg = &(style->fg[GTK_STATE_NORMAL]);
- gdk_cairo_set_source_color (ctx, win_bg);
+ gdk_cairo_set_source_rgba (ctx, win_bg);
cairo_rectangle (ctx, 0, 0, width, height);
cairo_fill (ctx);
- gdk_cairo_set_source_color (ctx, win_fg);
+ gdk_cairo_set_source_rgba (ctx, win_fg);
for (i=0;i<=NUMLINES;i++) {
x_offs = X_OFFSET(i);
diff --git a/app/ruler.c b/app/ruler.c
index c26b0551..bc8ea053 100644
--- a/app/ruler.c
+++ b/app/ruler.c
@@ -85,9 +85,9 @@ dia_ruler_draw (GtkWidget *widget,
dy = (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) ? height/3 : 0;
#if GTK_CHECK_VERSION(2,18,0)
- gdk_cairo_set_source_color (cr, &style->text[gtk_widget_get_state(widget)]);
+ gdk_cairo_set_source_rgba (cr, &style->text[gtk_widget_get_state(widget)]);
#else
- gdk_cairo_set_source_color (cr, &style->text[GTK_WIDGET_STATE(widget)]);
+ gdk_cairo_set_source_rgba (cr, &style->text[GTK_WIDGET_STATE(widget)]);
#endif
cairo_set_line_width (cr, 1);
diff --git a/lib/arrows.c b/lib/arrows.c
index b5dc6e64..e2774ba9 100644
--- a/lib/arrows.c
+++ b/lib/arrows.c
@@ -54,7 +54,7 @@ calculate_double_arrow(Point *second_to, Point *second_from,
static void
draw_crow_foot(DiaRenderer *renderer, Point *to, Point *from,
real length, real width, real linewidth,
- GdkRGBA *fg_colorGdkRGBA *bg_color);
+ GdkRGBA *fg_color, GdkRGBA *bg_color);
static int
calculate_diamond(Point *poly/*[4]*/, const Point *to, const Point *from,
real length, real width);
diff --git a/lib/pattern.h b/lib/pattern.h
index ecdbb5fb..21a86765 100644
--- a/lib/pattern.h
+++ b/lib/pattern.h
@@ -20,10 +20,12 @@
*/
#ifndef PATTERN_H
#define PATTERN_H
-
+
+#include "attributes.h"
#include "diatypes.h"
#include "geometry.h"
#include <glib.h>
+#include <gdk/gdk.h>
G_BEGIN_DECLS
diff --git a/lib/prop_text.c b/lib/prop_text.c
index a6e6d132..68b51f56 100644
--- a/lib/prop_text.c
+++ b/lib/prop_text.c
@@ -115,7 +115,7 @@ multistringprop_handle_key(GtkWidget *wid, GdkEventKey *event)
/** Actually, this doesn't seem to work -- I guess the dialog closes
* becore this is called :(
*/
- if (event->keyval == GDK_Return)
+ if (event->keyval == GDK_KEY_Return)
return TRUE;
return FALSE;
}
diff --git a/lib/textattr.h b/lib/textattr.h
index 55e0d7d1..23f4bb62 100644
--- a/lib/textattr.h
+++ b/lib/textattr.h
@@ -18,6 +18,8 @@
#ifndef TEXTATTR_H
#define TEXTATTR_H
+#include <gdk/gdk.h>
+
#include "diatypes.h"
#include "font.h"
#include "geometry.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]