summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-03-16 04:15:22 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-03-16 04:15:22 +0000
commitdd882dfdf6cf6ccfa55472577d89245a1e49d688 (patch)
tree3cffc864bbcd55cb4d270d59245c2ca710bbe0e1 /src
parentclean up (diff)
downloadinkscape-dd882dfdf6cf6ccfa55472577d89245a1e49d688.tar.gz
inkscape-dd882dfdf6cf6ccfa55472577d89245a1e49d688.zip
Fix for 950508 : Fill Stroke : Minor visual enhancements, fix for Opacity label size
(bzr r11093)
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/filter-effect-chooser.cpp17
-rw-r--r--src/ui/widget/filter-effect-chooser.h1
-rw-r--r--src/ui/widget/object-composite-settings.cpp15
-rw-r--r--src/ui/widget/object-composite-settings.h1
4 files changed, 22 insertions, 12 deletions
diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp
index 1b2e23bc4..a2519d4bb 100644
--- a/src/ui/widget/filter-effect-chooser.cpp
+++ b/src/ui/widget/filter-effect-chooser.cpp
@@ -23,7 +23,6 @@ namespace Widget {
SimpleFilterModifier::SimpleFilterModifier(int flags)
: _hb_blur(false, 0),
- _hb_blur_label(false, 0),
_lb_blend(_("Blend mode:")),
_lb_blur(_("_Blur:")),
_blend(BlendModeConverter, SP_ATTR_INVALID, false),
@@ -39,12 +38,18 @@ SimpleFilterModifier::SimpleFilterModifier(int flags)
if (flags & 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.
+ * Hack to get a min size of label, but still be able to expand if needed
+ * Should match ObjectCompositeSettings::_opacity_label
*/
- _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);
+ if (_lb_blur.get_text().length() < 7) {
+ _lb_blur.set_width_chars(7);
+ }
+ #if WITH_GTKMM_2_22
+ _lb_blur.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER);
+ #else
+ _lb_blur.set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
+ #endif
+ _hb_blur.pack_start(_lb_blur, false, false, 0);
_hb_blur.pack_start(_blur, true, true, 0);
}
diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h
index f7a403762..2d41eb3bf 100644
--- a/src/ui/widget/filter-effect-chooser.h
+++ b/src/ui/widget/filter-effect-chooser.h
@@ -50,7 +50,6 @@ private:
int _flags;
Gtk::HBox _hb_blend;
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 89a398fe2..9613f2d4f 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -62,7 +62,6 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
_blur_tag(Glib::ustring(history_prefix) + ":blur"),
_opacity_tag(Glib::ustring(history_prefix) + ":opacity"),
_opacity_vbox(false, 0),
- _opacity_label_box(false, 0),
_opacity_label(_("Opacity:")),
_opacity_adjustment(100.0, 0.0, 100.0, 1.0, 1.0, 0.0),
_opacity_hscale(_opacity_adjustment),
@@ -72,6 +71,7 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
_fe_alignment(1, 1, 1, 1),
_blocked(false)
{
+
// Filter Effects
pack_start(_fe_vbox, false, false, 2);
_fe_alignment.set_padding(0, 0, 4, 0);
@@ -81,9 +81,16 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
// Opacity
pack_start(_opacity_vbox, false, false, 2);
- _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);
+ if (_opacity_label.get_text().length() < 7) {
+ _opacity_label.set_width_chars(7);
+ }
+#if WITH_GTKMM_2_22
+ _opacity_label.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER);
+#else
+ _opacity_label.set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
+#endif
+
+ _opacity_hbox.pack_start(_opacity_label, 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, 0);
diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h
index 7b0e9b994..d05839a03 100644
--- a/src/ui/widget/object-composite-settings.h
+++ b/src/ui/widget/object-composite-settings.h
@@ -45,7 +45,6 @@ private:
Glib::ustring _opacity_tag;
Gtk::VBox _opacity_vbox;
- Gtk::HBox _opacity_label_box;
Gtk::HBox _opacity_hbox;
Gtk::Label _opacity_label;
Gtk::Adjustment _opacity_adjustment;