summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-07-05 22:57:09 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-07-05 22:57:09 +0000
commit58f3f347f828b8bfe0fb01ba3194ee5ec3a8c961 (patch)
treec1e4647b685cf05844bd3dffcb324d6a4942f88c /src
parentMerge branch 'ccrb/inkscape-fix-template-preview-crash' (diff)
downloadinkscape-58f3f347f828b8bfe0fb01ba3194ee5ec3a8c961.tar.gz
inkscape-58f3f347f828b8bfe0fb01ba3194ee5ec3a8c961.zip
cursors: rm deprecated gtkstyle custom black/white
Diffstat (limited to 'src')
-rw-r--r--src/sp-cursor.cpp6
-rw-r--r--src/sp-cursor.h2
-rw-r--r--src/ui/tools/dropper-tool.cpp8
-rw-r--r--src/ui/tools/tool-base.cpp4
4 files changed, 7 insertions, 13 deletions
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index 78bfc9075..641585d6f 100644
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
@@ -54,7 +54,7 @@ struct RGBA {
}
};
-GdkCursor *sp_cursor_from_xpm(char const *const *xpm, GdkColor *black, GdkColor *white, guint32 fill, guint32 stroke)
+GdkCursor *sp_cursor_from_xpm(char const *const *xpm, guint32 fill, guint32 stroke)
{
GdkPixbuf *pixbuf;
GdkCursor *cursor;
@@ -97,10 +97,6 @@ GdkCursor *sp_cursor_from_xpm(char const *const *xpm, GdkColor *black, GdkColor
colorMap[ccode] = RGBA(SP_RGBA32_R_U(fill), SP_RGBA32_G_U(fill), SP_RGBA32_B_U(fill), SP_RGBA32_A_U(fill));
} else if (strcmp(p, "Stroke") == 0) {
colorMap[ccode] = RGBA(SP_RGBA32_R_U(stroke), SP_RGBA32_G_U(stroke), SP_RGBA32_B_U(stroke), SP_RGBA32_A_U(stroke));
- } else if (black && strcmp(p, "#000000") == 0) {
- colorMap[ccode] = RGBA(black->red, black->green, black->blue, 255);
- } else if (white && strcmp(p, "#FFFFFF") == 0) {
- colorMap[ccode] = RGBA(white->red, white->green, white->blue, 255);
} else if (p[0] == '#') {
GdkRGBA color;
if (gdk_rgba_parse(&color, p)) {
diff --git a/src/sp-cursor.h b/src/sp-cursor.h
index 6579d6a16..d6c8c945c 100644
--- a/src/sp-cursor.h
+++ b/src/sp-cursor.h
@@ -6,7 +6,7 @@ typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkColor GdkColor;
-GdkCursor* sp_cursor_from_xpm(char const *const *xpm, GdkColor *black=NULL, GdkColor *white=NULL, guint32 fill=0, guint32 stroke=0);
+GdkCursor* sp_cursor_from_xpm(char const *const *xpm, guint32 fill=0, guint32 stroke=0);
#endif
diff --git a/src/ui/tools/dropper-tool.cpp b/src/ui/tools/dropper-tool.cpp
index 4524d2445..9b37aed17 100644
--- a/src/ui/tools/dropper-tool.cpp
+++ b/src/ui/tools/dropper-tool.cpp
@@ -380,15 +380,15 @@ bool DropperTool::root_handler(GdkEvent* event) {
GdkCursor *cursor;
if(apply) {
if(draw_cursor == DRAW_FILL_CURSOR) {
- cursor = sp_cursor_from_xpm(cursor_dropping_f_xpm, NULL, NULL, apply_color);
+ cursor = sp_cursor_from_xpm(cursor_dropping_f_xpm, apply_color);
} else if(draw_cursor == DRAW_STROKE_CURSOR) {
- cursor = sp_cursor_from_xpm(cursor_dropping_s_xpm, NULL, NULL, apply_color);
+ cursor = sp_cursor_from_xpm(cursor_dropping_s_xpm, apply_color);
}
} else {
if(draw_cursor == DRAW_FILL_CURSOR) {
- cursor = sp_cursor_from_xpm(cursor_dropper_f_xpm, NULL, NULL, this->get_color());
+ cursor = sp_cursor_from_xpm(cursor_dropper_f_xpm, this->get_color());
} else if(draw_cursor == DRAW_STROKE_CURSOR) {
- cursor = sp_cursor_from_xpm(cursor_dropper_s_xpm, NULL, NULL, this->get_color());
+ cursor = sp_cursor_from_xpm(cursor_dropper_s_xpm, this->get_color());
}
}
GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(desktop->getCanvas()));
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 457d704aa..59346b491 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -156,8 +156,6 @@ void ToolBase::sp_event_context_set_cursor(GdkCursorType cursor_type) {
void ToolBase::sp_event_context_update_cursor() {
GtkWidget *w = GTK_WIDGET(this->desktop->getCanvas());
if (gtk_widget_get_window (w)) {
- GtkStyle *style = gtk_widget_get_style(w);
-
if (this->cursor_shape) {
if(this->cursor) {
g_object_unref(this->cursor);
@@ -170,7 +168,7 @@ void ToolBase::sp_event_context_update_cursor() {
double strokeOpacity = strokeHasColor ? sp_desktop_get_opacity_tool(this->desktop, this->getPrefsPath(), false) : 0;
this->cursor = sp_cursor_from_xpm(
- this->cursor_shape, &style->black, &style->white,
+ this->cursor_shape,
SP_RGBA32_C_COMPOSE(fillColor, fillOpacity),
SP_RGBA32_C_COMPOSE(strokeColor, strokeOpacity)
);