summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2016-03-08 01:23:26 +0000
committerMartin Owens <doctormo@gmail.com>2016-03-08 01:23:26 +0000
commite0d7f04457c7ed18b5f4df751f66e40ad8ab18a9 (patch)
tree8c700db3298a327a9648c9fbcb6f8e92bca53cf3 /src/widgets/stroke-style.cpp
parentAdd GUI for 'paint-order' property. (diff)
downloadinkscape-e0d7f04457c7ed18b5f4df751f66e40ad8ab18a9.tar.gz
inkscape-e0d7f04457c7ed18b5f4df751f66e40ad8ab18a9.zip
Re-order the stroke dialog so buttons are collected and miter is inline.
(bzr r14694)
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp142
1 files changed, 69 insertions, 73 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index e1e5ecc17..84a6e77ad 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -221,6 +221,67 @@ StrokeStyle::StrokeStyle() :
#endif
i++;
+ /* Dash */
+ spw_label(table, _("Dashes:"), 0, i, NULL); //no mnemonic for now
+ //decide what to do:
+ // implement a set_mnemonic_source function in the
+ // SPDashSelector class, so that we do not have to
+ // expose any of the underlying widgets?
+ dashSelector = Gtk::manage(new SPDashSelector);
+
+ dashSelector->show();
+
+#if WITH_GTKMM_3_0
+ dashSelector->set_hexpand();
+ dashSelector->set_halign(Gtk::ALIGN_FILL);
+ dashSelector->set_valign(Gtk::ALIGN_CENTER);
+ table->attach(*dashSelector, 1, i, 3, 1);
+#else
+ table->attach(*dashSelector, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
+#endif
+
+ dashSelector->changed_signal.connect(sigc::mem_fun(*this, &StrokeStyle::lineDashChangedCB));
+
+ i++;
+
+ /* Drop down marker selectors*/
+ // TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
+ // (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
+
+ spw_label(table, _("Markers:"), 0, i, NULL);
+
+ hb = spw_hbox(table, 1, 1, i);
+ i++;
+
+ startMarkerCombo = Gtk::manage(new MarkerComboBox("marker-start", SP_MARKER_LOC_START));
+ startMarkerCombo->set_tooltip_text(_("Start Markers are drawn on the first node of a path or shape"));
+ startMarkerConn = startMarkerCombo->signal_changed().connect(
+ sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
+ sigc::ptr_fun(&StrokeStyle::markerSelectCB), startMarkerCombo, this, SP_MARKER_LOC_START));
+ startMarkerCombo->show();
+
+ hb->pack_start(*startMarkerCombo, true, true, 0);
+
+ midMarkerCombo = Gtk::manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID));
+ midMarkerCombo->set_tooltip_text(_("Mid Markers are drawn on every node of a path or shape except the first and last nodes"));
+ midMarkerConn = midMarkerCombo->signal_changed().connect(
+ sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
+ sigc::ptr_fun(&StrokeStyle::markerSelectCB), midMarkerCombo, this, SP_MARKER_LOC_MID));
+ midMarkerCombo->show();
+
+ hb->pack_start(*midMarkerCombo, true, true, 0);
+
+ endMarkerCombo = Gtk::manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END));
+ endMarkerCombo->set_tooltip_text(_("End Markers are drawn on the last node of a path or shape"));
+ endMarkerConn = endMarkerCombo->signal_changed().connect(
+ sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
+ sigc::ptr_fun(&StrokeStyle::markerSelectCB), endMarkerCombo, this, SP_MARKER_LOC_END));
+ endMarkerCombo->show();
+
+ hb->pack_start(*endMarkerCombo, true, true, 0);
+
+ i++;
+
/* Join type */
// TRANSLATORS: The line join style specifies the shape to be used at the
// corners of paths. It can be "miter", "round" or "bevel".
@@ -230,14 +291,6 @@ StrokeStyle::StrokeStyle() :
Gtk::RadioButtonGroup joinGrp;
- joinMiter = makeRadioButton(joinGrp, INKSCAPE_ICON("stroke-join-miter"),
- hb, STROKE_STYLE_BUTTON_JOIN, "miter");
-
- // TRANSLATORS: Miter join: joining lines with a sharp (pointed) corner.
- // For an example, draw a triangle with a large stroke width and modify the
- // "Join" option (in the Fill and Stroke dialog).
- joinMiter->set_tooltip_text(_("Miter join"));
-
joinRound = makeRadioButton(joinGrp, INKSCAPE_ICON("stroke-join-round"),
hb, STROKE_STYLE_BUTTON_JOIN, "round");
@@ -254,7 +307,13 @@ StrokeStyle::StrokeStyle() :
// "Join" option (in the Fill and Stroke dialog).
joinBevel->set_tooltip_text(_("Bevel join"));
- i++;
+ joinMiter = makeRadioButton(joinGrp, INKSCAPE_ICON("stroke-join-miter"),
+ hb, STROKE_STYLE_BUTTON_JOIN, "miter");
+
+ // TRANSLATORS: Miter join: joining lines with a sharp (pointed) corner.
+ // For an example, draw a triangle with a large stroke width and modify the
+ // "Join" option (in the Fill and Stroke dialog).
+ joinMiter->set_tooltip_text(_("Miter join"));
/* Miterlimit */
// TRANSLATORS: Miter limit: only for "miter join", this limits the length
@@ -265,8 +324,6 @@ StrokeStyle::StrokeStyle() :
// when they become too long.
//spw_label(t, _("Miter _limit:"), 0, i);
- hb = spw_hbox(table, 3, 1, i);
-
#if WITH_GTKMM_3_0
miterLimitAdj = new Glib::RefPtr<Gtk::Adjustment>(Gtk::Adjustment::create(4.0, 0.0, 100.0, 0.1, 10.0, 0.0));
miterLimitSpin = new Inkscape::UI::Widget::SpinButton(*miterLimitAdj, 0.1, 2);
@@ -277,7 +334,6 @@ StrokeStyle::StrokeStyle() :
miterLimitSpin->set_tooltip_text(_("Maximum length of the miter (in units of stroke width)"));
miterLimitSpin->show();
- spw_label(table, _("Miter _limit:"), 0, i, miterLimitSpin);
sp_dialog_defocus_on_enter_cpp(miterLimitSpin);
hb->pack_start(*miterLimitSpin, false, false, 0);
@@ -288,6 +344,7 @@ StrokeStyle::StrokeStyle() :
#else
miterLimitAdj->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::miterLimitChangedCB));
#endif
+
i++;
/* Cap type */
@@ -322,67 +379,6 @@ StrokeStyle::StrokeStyle() :
i++;
- /* Dash */
- spw_label(table, _("Dashes:"), 0, i, NULL); //no mnemonic for now
- //decide what to do:
- // implement a set_mnemonic_source function in the
- // SPDashSelector class, so that we do not have to
- // expose any of the underlying widgets?
- dashSelector = Gtk::manage(new SPDashSelector);
-
- dashSelector->show();
-
-#if WITH_GTKMM_3_0
- dashSelector->set_hexpand();
- dashSelector->set_halign(Gtk::ALIGN_FILL);
- dashSelector->set_valign(Gtk::ALIGN_CENTER);
- table->attach(*dashSelector, 1, i, 3, 1);
-#else
- table->attach(*dashSelector, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
-#endif
-
- dashSelector->changed_signal.connect(sigc::mem_fun(*this, &StrokeStyle::lineDashChangedCB));
-
- i++;
-
- /* Drop down marker selectors*/
- // TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
- // (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
-
- spw_label(table, _("Markers:"), 0, i, NULL);
-
- hb = spw_hbox(table, 1, 1, i);
- i++;
-
- startMarkerCombo = Gtk::manage(new MarkerComboBox("marker-start", SP_MARKER_LOC_START));
- startMarkerCombo->set_tooltip_text(_("Start Markers are drawn on the first node of a path or shape"));
- startMarkerConn = startMarkerCombo->signal_changed().connect(
- sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
- sigc::ptr_fun(&StrokeStyle::markerSelectCB), startMarkerCombo, this, SP_MARKER_LOC_START));
- startMarkerCombo->show();
-
- hb->pack_start(*startMarkerCombo, true, true, 0);
-
- midMarkerCombo = Gtk::manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID));
- midMarkerCombo->set_tooltip_text(_("Mid Markers are drawn on every node of a path or shape except the first and last nodes"));
- midMarkerConn = midMarkerCombo->signal_changed().connect(
- sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
- sigc::ptr_fun(&StrokeStyle::markerSelectCB), midMarkerCombo, this, SP_MARKER_LOC_MID));
- midMarkerCombo->show();
-
- hb->pack_start(*midMarkerCombo, true, true, 0);
-
- endMarkerCombo = Gtk::manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END));
- endMarkerCombo->set_tooltip_text(_("End Markers are drawn on the last node of a path or shape"));
- endMarkerConn = endMarkerCombo->signal_changed().connect(
- sigc::bind<MarkerComboBox *, StrokeStyle *, SPMarkerLoc>(
- sigc::ptr_fun(&StrokeStyle::markerSelectCB), endMarkerCombo, this, SP_MARKER_LOC_END));
- endMarkerCombo->show();
-
- hb->pack_start(*endMarkerCombo, true, true, 0);
-
- i++;
-
/* Paint order */
// TRANSLATORS: Paint order determines the order the 'fill', 'stroke', and 'markers are painted.
spw_label(table, _("Order:"), 0, i, NULL);