summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/filter-effect-chooser.cpp26
-rw-r--r--src/ui/widget/filter-effect-chooser.h3
-rw-r--r--src/ui/widget/object-composite-settings.cpp10
-rw-r--r--src/widgets/paint-selector.cpp32
-rw-r--r--src/widgets/paint-selector.h1
5 files changed, 45 insertions, 27 deletions
diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp
index 6fe21319d..1b2e23bc4 100644
--- a/src/ui/widget/filter-effect-chooser.cpp
+++ b/src/ui/widget/filter-effect-chooser.cpp
@@ -22,26 +22,30 @@ namespace UI {
namespace Widget {
SimpleFilterModifier::SimpleFilterModifier(int flags)
- : _lb_blend(_("Blend mode:")),
-#if WITH_GTKMM_2_22
- _lb_blur(_("_Blur:"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER, true),
-#else
- _lb_blur(_("_Blur:"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, true),
-#endif
+ : _hb_blur(false, 0),
+ _hb_blur_label(false, 0),
+ _lb_blend(_("Blend mode:")),
+ _lb_blur(_("_Blur:")),
_blend(BlendModeConverter, SP_ATTR_INVALID, false),
- _blur(0, 0, 100, 1, 0.01, 2)
+ _blur(0, 0, 100, 1, 0.01, 1)
{
_flags = flags;
if (flags & BLEND) {
add(_hb_blend);
- _hb_blend.pack_start(_lb_blend, false, false);
+ _hb_blend.pack_start(_lb_blend);
_hb_blend.pack_start(_blend);
}
if (flags & BLUR) {
- add(_vb_blur);
- _vb_blur.add(_lb_blur);
- _vb_blur.add(_blur);
+ add(_hb_blur);
+ /*
+ * This size should match _opacity_label_box in object-composite-settings.cpp so the
+ * controls line up in Fill and Stroke dialog.
+ */
+ _hb_blur_label.set_size_request(55, 0);
+ _hb_blur_label.pack_end(_lb_blur, false, false, 0);
+ _hb_blur.pack_start(_hb_blur_label, false, false, 0);
+ _hb_blur.pack_start(_blur, true, true, 0);
}
show_all_children();
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index 3c3da6c2d..f7a403762 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -49,7 +49,8 @@ public:
private:
int _flags;
Gtk::HBox _hb_blend;
- Gtk::VBox _vb_blur;
+ Gtk::HBox _hb_blur;
+ Gtk::HBox _hb_blur_label;
Gtk::Label _lb_blend, _lb_blur;
ComboBoxEnum<Inkscape::Filters::FilterBlendMode> _blend;
SpinSlider _blur;
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index afeec5492..89a398fe2 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -63,7 +63,7 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
_opacity_tag(Glib::ustring(history_prefix) + ":opacity"),
_opacity_vbox(false, 0),
_opacity_label_box(false, 0),
- _opacity_label(_("_Opacity (%):"), 0.0, 1.0, true),
+ _opacity_label(_("Opacity:")),
_opacity_adjustment(100.0, 0.0, 100.0, 1.0, 1.0, 0.0),
_opacity_hscale(_opacity_adjustment),
_opacity_spin_button(_opacity_adjustment, 0.01, 1),
@@ -81,10 +81,12 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
// Opacity
pack_start(_opacity_vbox, false, false, 2);
- _opacity_label_box.pack_start(_opacity_label, false, false, 4);
- _opacity_vbox.pack_start(_opacity_label_box, false, false, 0);
+ _opacity_label_box.pack_end(_opacity_label, false, false, 0);
+ _opacity_label_box.set_size_request(55, 0);
+ _opacity_hbox.pack_start(_opacity_label_box, false, false, 3);
+ //_opacity_vbox.pack_start(_opacity_label_box, false, false, 0);
_opacity_vbox.pack_start(_opacity_hbox, false, false, 0);
- _opacity_hbox.pack_start(_opacity_hscale, true, true, 4);
+ _opacity_hbox.pack_start(_opacity_hscale, true, true, 0);
_opacity_hbox.pack_start(_opacity_spin_button, false, false, 0);
_opacity_hscale.set_draw_value(false);
_opacity_adjustment.signal_value_changed().connect(sigc::mem_fun(*this, &ObjectCompositeSettings::_opacityValueChanged));
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index d330e2bac..d67160483 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -267,11 +267,18 @@ sp_paint_selector_init(SPPaintSelector *psel)
}
/* Frame */
- psel->frame = gtk_frame_new("");
+ psel->label = gtk_label_new("");
+ GtkWidget *lbbox = gtk_hbox_new(FALSE, 4);
+ gtk_widget_show(psel->label);
+ gtk_box_pack_start(GTK_BOX(lbbox), psel->label, false, false, 4);
+ gtk_box_pack_start(GTK_BOX(psel), lbbox, false, false, 4);
+
+ psel->frame = gtk_vbox_new(FALSE, 4);
gtk_widget_show(psel->frame);
- gtk_container_set_border_width(GTK_CONTAINER(psel->frame), 0);
+ //gtk_container_set_border_width(GTK_CONTAINER(psel->frame), 0);
gtk_box_pack_start(GTK_BOX(psel), psel->frame, TRUE, TRUE, 0);
+
/* Last used color */
psel->color.set( 0.0, 0.0, 0.0 );
psel->alpha = 1.0;
@@ -573,7 +580,7 @@ sp_paint_selector_set_mode_empty(SPPaintSelector *psel)
sp_paint_selector_clear_frame(psel);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("No objects"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>No objects</b>"));
}
static void
@@ -584,7 +591,7 @@ sp_paint_selector_set_mode_multiple(SPPaintSelector *psel)
sp_paint_selector_clear_frame(psel);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Multiple styles"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Multiple styles</b>"));
}
static void
@@ -595,7 +602,7 @@ sp_paint_selector_set_mode_unset(SPPaintSelector *psel)
sp_paint_selector_clear_frame(psel);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Paint is undefined"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Paint is undefined</b>"));
}
static void
@@ -606,7 +613,8 @@ sp_paint_selector_set_mode_none(SPPaintSelector *psel)
sp_paint_selector_clear_frame(psel);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("No paint"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>No paint</b>"));
+
}
/* Color paint */
@@ -663,6 +671,7 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
g_signal_connect(G_OBJECT(csel), "changed", G_CALLBACK(sp_paint_selector_color_changed), psel);
/* Pack everything to frame */
gtk_container_add(GTK_CONTAINER(psel->frame), vb);
+
psel->selector = vb;
/* Set color */
@@ -670,7 +679,8 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
}
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Flat color"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Flat color</b>"));
+
#ifdef SP_PS_VERBOSE
g_print("Color req\n");
#endif
@@ -733,10 +743,10 @@ static void sp_paint_selector_set_mode_gradient(SPPaintSelector *psel, SPPaintSe
if (mode == SPPaintSelector::MODE_GRADIENT_LINEAR) {
SP_GRADIENT_SELECTOR(gsel)->setMode(SPGradientSelector::MODE_LINEAR);
//sp_gradient_selector_set_mode(SP_GRADIENT_SELECTOR(gsel), SP_GRADIENT_SELECTOR_MODE_LINEAR);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Linear gradient"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Linear gradient</b>"));
} else {
SP_GRADIENT_SELECTOR(gsel)->setMode(SPGradientSelector::MODE_RADIAL);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Radial gradient"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Radial gradient</b>"));
}
#ifdef SP_PS_VERBOSE
g_print("Gradient req\n");
@@ -1016,7 +1026,7 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel
psel->selector = tbl;
g_object_set_data(G_OBJECT(psel->selector), "pattern-selector", tbl);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Pattern fill"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Pattern fill</b>"));
}
#ifdef SP_PS_VERBOSE
g_print("Pattern req\n");
@@ -1091,7 +1101,7 @@ static void sp_paint_selector_set_mode_swatch(SPPaintSelector *psel, SPPaintSele
psel->selector = GTK_WIDGET(swatchsel->gobj());
g_object_set_data(G_OBJECT(psel->selector), "swatch-selector", swatchsel);
- gtk_frame_set_label(GTK_FRAME(psel->frame), _("Swatch fill"));
+ gtk_label_set_markup(GTK_LABEL(psel->label), _("<b>Swatch fill</b>"));
}
#ifdef SP_PS_VERBOSE
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h
index 69cfa602e..7400987ee 100644
--- a/src/widgets/paint-selector.h
+++ b/src/widgets/paint-selector.h
@@ -72,6 +72,7 @@ struct SPPaintSelector {
GtkWidget *evenodd, *nonzero;
GtkWidget *frame, *selector;
+ GtkWidget *label;
SPColor color;
float alpha;