From 631a285a36f65a5ab6eb0626c0e65ad4c85f1c21 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Sat, 31 Dec 2016 02:26:39 +0100 Subject: Not target bug. Fixes a typo in last minute refactor that ignore mirroring in fuse options of rotate copies LPE. The mirror affine is redeclared and not overwited as we need. Also inicializa a value as double in pattern along path (Not Backported) (bzr r15378) --- src/live_effects/lpe-copy_rotate.cpp | 2 +- src/live_effects/lpe-patternalongpath.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp index 3dd35696a..c8f1b9e75 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -259,7 +259,7 @@ LPECopyRotate::setFusion(Geom::PathVector &path_on, Geom::Path divider, double s Geom::Point A = (Geom::Point)origin; Geom::Point B = origin + dir * Geom::Rotate(-Geom::rad_from_deg((rotation_angle*i)+starting_angle)) * size_divider; Geom::Line ls(A,B); - Geom::Affine m = Geom::reflection (ls.vector(), A); + m = Geom::reflection (ls.vector(), A); } else { append_path = original; } diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp index e5c9f1be1..c1853ef22 100644 --- a/src/live_effects/lpe-patternalongpath.cpp +++ b/src/live_effects/lpe-patternalongpath.cpp @@ -63,7 +63,7 @@ static const Util::EnumDataConverter PAPCopyTypeConverter(PAPCopyTy LPEPatternAlongPath::LPEPatternAlongPath(LivePathEffectObject *lpeobject) : Effect(lpeobject), pattern(_("Pattern source:"), _("Path to put along the skeleton path"), "pattern", &wr, this, "M0,0 L1,0"), - original_height(0), + original_height(0.0), prop_scale(_("_Width:"), _("Width of the pattern"), "prop_scale", &wr, this, 1.0), copytype(_("Pattern copies:"), _("How many pattern copies to place along the skeleton path"), "copytype", PAPCopyTypeConverter, &wr, this, PAPCT_SINGLE_STRETCHED), -- cgit v1.2.3 From ca582fca3730cd56f2d0f6df107eebe24044ed5a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 31 Dec 2016 18:28:52 +0000 Subject: ruler: Read state flags for GtkStyleContext correctly (bzr r15380) --- src/widgets/gimp/ruler.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/widgets/gimp/ruler.cpp b/src/widgets/gimp/ruler.cpp index 7e9547080..2a71b5c08 100644 --- a/src/widgets/gimp/ruler.cpp +++ b/src/widgets/gimp/ruler.cpp @@ -12,7 +12,9 @@ * - We use a default font size of PANGO_SCALE_X_SMALL for labels, * GIMP uses PANGO_SCALE_SMALL (i.e., a bit larger than ours). * - * - We abbreviate large numbers in tick-labels (e.g., 10000 -> 10k) + * - We abbreviate large numbers in tick-labels (e.g., 10000 -> 10k) + * + * - GtkStateFlags are read from GtkStyleContext objects where appropriate * * Authors: * Lauris Kaplinski @@ -578,7 +580,9 @@ sp_ruler_size_request (GtkWidget *widget, GtkStyleContext *context = gtk_widget_get_style_context (widget); GtkBorder border; - gtk_style_context_get_border (context, static_cast(0), &border); + GtkStateFlags state_flags = gtk_style_context_get_state (context); + + gtk_style_context_get_border (context, state_flags, &border); requisition->width = border.left + border.right; requisition->height = border.top + border.bottom; @@ -1088,7 +1092,9 @@ sp_ruler_draw_ticks (SPRuler *ruler) gtk_widget_get_allocation (widget, &allocation); - gtk_style_context_get_border (context, static_cast(0), &border); + GtkStateFlags state_flags = gtk_style_context_get_state (context); + + gtk_style_context_get_border (context, state_flags, &border); layout = sp_ruler_get_layout (widget, "0123456789"); pango_layout_get_extents (layout, &ink_rect, &logical_rect); @@ -1300,7 +1306,9 @@ sp_ruler_get_pos_rect (SPRuler *ruler, GtkStyleContext *context = gtk_widget_get_style_context (widget); GtkBorder padding; - gtk_style_context_get_border(context, static_cast(0), &padding); + GtkStateFlags state_flags = gtk_style_context_get_state (context); + + gtk_style_context_get_border(context, state_flags, &padding); xthickness = padding.left + padding.right; ythickness = padding.top + padding.bottom; -- cgit v1.2.3