diff options
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/eek-preview.cpp | 11 | ||||
| -rw-r--r-- | src/widgets/sp-color-icc-selector.cpp | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/widgets/eek-preview.cpp b/src/widgets/eek-preview.cpp index 953beb69d..72db91373 100644 --- a/src/widgets/eek-preview.cpp +++ b/src/widgets/eek-preview.cpp @@ -229,9 +229,14 @@ static gboolean eek_preview_draw(GtkWidget* widget, cairo_t* cr) GtkAllocation allocation; gtk_widget_get_allocation(widget, &allocation); EekPreview* preview = EEK_PREVIEW(widget); - GdkColor fg = { 0, preview->_r, preview->_g, preview->_b }; - gint insetTop = 0, insetBottom = 0; - gint insetLeft = 0, insetRight = 0; + + GdkColor fg = { 0, + static_cast<guint16>(preview->_r), + static_cast<guint16>(preview->_g), + static_cast<guint16>(preview->_b)}; + + gint insetTop = 0, insetBottom = 0; + gint insetLeft = 0, insetRight = 0; if (preview->_border == BORDER_SOLID) { insetTop = 1; diff --git a/src/widgets/sp-color-icc-selector.cpp b/src/widgets/sp-color-icc-selector.cpp index d04f17a30..b021ac43d 100644 --- a/src/widgets/sp-color-icc-selector.cpp +++ b/src/widgets/sp-color-icc-selector.cpp @@ -510,9 +510,9 @@ void ColorICCSelector::_switchToProfile( gchar const* name ) if ( trans ) { guint32 val = _color.toRGBA32(0); guchar pre[4] = { - SP_RGBA32_R_U(val), - SP_RGBA32_G_U(val), - SP_RGBA32_B_U(val), + static_cast<guchar>(SP_RGBA32_R_U(val)), + static_cast<guchar>(SP_RGBA32_G_U(val)), + static_cast<guchar>(SP_RGBA32_B_U(val)), 255}; #ifdef DEBUG_LCMS g_message("Shoving in [%02x] [%02x] [%02x]", pre[0], pre[1], pre[2]); |
