summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-11-03 23:01:10 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-11-03 23:01:10 +0000
commit25d3dc9c6df60f0b31bd500411e593ddfa86cc98 (patch)
tree3b515ef63418892908badac9deb2e4e6da6ce88e /src/ui/widget/selected-style.cpp
parentInkscape::URI API enhancements (diff)
downloadinkscape-25d3dc9c6df60f0b31bd500411e593ddfa86cc98.tar.gz
inkscape-25d3dc9c6df60f0b31bd500411e593ddfa86cc98.zip
Use monospace digits font in messages and spinbuttons
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 0fc19e282..a16dcc26b 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -116,32 +116,26 @@ static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries);
static Dialog::FillAndStroke *get_fill_and_stroke_panel(SPDesktop *desktop);
SelectedStyle::SelectedStyle(bool /*layout*/)
- :
- current_stroke_width(0),
-
- _sw_unit(nullptr),
-
- _desktop (nullptr),
- _table(),
- _fill_label (_("Fill:")),
- _stroke_label (_("Stroke:")),
- _opacity_label (_("O:")),
-
- _fill_place(this, SS_FILL),
- _stroke_place(this, SS_STROKE),
-
- _fill_flag_place (),
- _stroke_flag_place (),
-
- _opacity_place (),
- _opacity_adjustment(Gtk::Adjustment::create(100, 0.0, 100, 1.0, 10.0)),
- _opacity_sb (0.02, 0),
-
- _stroke (),
- _stroke_width_place(this),
- _stroke_width (""),
-
- _opacity_blocked (false)
+ : current_stroke_width(0)
+ , _sw_unit(nullptr)
+ , _desktop(nullptr)
+ , _table()
+ , _fill_label(_("Fill:"))
+ , _stroke_label(_("Stroke:"))
+ , _opacity_label(_("O:"))
+ , _fill_place(this, SS_FILL)
+ , _stroke_place(this, SS_STROKE)
+ , _fill_flag_place()
+ , _stroke_flag_place()
+ , _opacity_place()
+ , _opacity_adjustment(Gtk::Adjustment::create(100, 0.0, 100, 1.0, 10.0))
+ , _opacity_sb(0.02, 0)
+ , _fill()
+ , _stroke()
+ , _stroke_width_place(this)
+ , _stroke_width("")
+ , _fill_empty_space("")
+ , _opacity_blocked(false)
{
set_name("SelectedStyle");
_drop[0] = _drop[1] = nullptr;
@@ -159,6 +153,9 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_opacity_label.set_valign(Gtk::ALIGN_CENTER);
_opacity_label.set_margin_top(0);
_opacity_label.set_margin_bottom(0);
+ _stroke_width.set_name("monoStrokeWidth");
+ _fill_empty_space.set_name("fillEmptySpace");
+
#if GTK_CHECK_VERSION(3,12,0)
_fill_label.set_margin_start(0);
@@ -371,6 +368,8 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_fill_place.add(_na[SS_FILL]);
_fill_place.set_tooltip_text(__na[SS_FILL]);
+ _fill.pack_start(_fill_place, Gtk::PACK_SHRINK);
+ _fill.pack_start(_fill_empty_space, Gtk::PACK_SHRINK);
_stroke_place.add(_na[SS_STROKE]);
_stroke_place.set_tooltip_text(__na[SS_STROKE]);
@@ -390,7 +389,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_table.attach(_fill_flag_place, 1, 0, 1, 1);
_table.attach(_stroke_flag_place, 1, 1, 1, 1);
- _table.attach(_fill_place, 2, 0, 1, 1);
+ _table.attach(_fill, 2, 0, 1, 1);
_table.attach(_stroke, 2, 1, 1, 1);
_opacity_place.add(_opacity_label);
@@ -1097,7 +1096,7 @@ SelectedStyle::update()
{
gchar *str = g_strdup_printf(" %#.3g", w);
- if (str[strlen(str)-1] == ',') {
+ if (str[strlen(str) - 1] == ',' || str[strlen(str) - 1] == '.') {
str[strlen(str)-1] = '\0';
}
_stroke_width.set_markup(str);