summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-11-18 14:26:08 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-11-18 14:26:08 +0000
commit992a532e20e460a42c0c1e3687042abddf7c8fbd (patch)
treefe5384c926294e638e526412c6a1ea49efdbf6cb /src
parentMake LPE Path along path behave more naturally. (fixes problems in moving a p... (diff)
downloadinkscape-992a532e20e460a42c0c1e3687042abddf7c8fbd.tar.gz
inkscape-992a532e20e460a42c0c1e3687042abddf7c8fbd.zip
Fix bug [ 1685684 ] Document Properties: Grid number fields round too broadly
(bzr r4108)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-grid.cpp13
-rw-r--r--src/ui/dialog/document-properties.cpp3
-rw-r--r--src/ui/widget/registered-widget.cpp1
-rw-r--r--src/ui/widget/scalar.cpp3
4 files changed, 18 insertions, 2 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index b4568d2e4..b58a53297 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -359,15 +359,28 @@ CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPD
table.set_spacings(2);
vbox.pack_start(table, false, false, 0);
+ Inkscape::UI::Widget::ScalarUnit * sutemp;
_rumg.init (_("Grid _units:"), "units", _wr, repr, doc);
_rsu_ox.init (_("_Origin X:"), _("X coordinate of grid origin"),
"originx", _rumg, _wr, repr, doc);
+ sutemp = _rsu_ox.getSU();
+ sutemp->setDigits(4);
+ sutemp->setIncrements(0.1, 1.0);
_rsu_oy.init (_("O_rigin Y:"), _("Y coordinate of grid origin"),
"originy", _rumg, _wr, repr, doc);
+ sutemp = _rsu_oy.getSU();
+ sutemp->setDigits(4);
+ sutemp->setIncrements(0.1, 1.0);
_rsu_sx.init (_("Spacing _X:"), _("Distance between vertical grid lines"),
"spacingx", _rumg, _wr, repr, doc);
+ sutemp = _rsu_sx.getSU();
+ sutemp->setDigits(4);
+ sutemp->setIncrements(0.1, 1.0);
_rsu_sy.init (_("Spacing _Y:"), _("Distance between horizontal grid lines"),
"spacingy", _rumg, _wr, repr, doc);
+ sutemp = _rsu_sy.getSU();
+ sutemp->setDigits(4);
+ sutemp->setIncrements(0.1, 1.0);
_rcp_gcol.init (_("Grid line _color:"), _("Grid line color"),
_("Color of grid lines"), "color", "opacity", _wr, repr, doc);
_rcp_gmcol.init (_("Ma_jor grid line color:"), _("Major grid line color"),
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 88e9f2bf2..7e71a0e3e 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -463,8 +463,7 @@ DocumentProperties::build_gridspage()
label_def, 0
};
attach_all(_page_grids.table(), widget_array, G_N_ELEMENTS(widget_array));
- _page_grids.table().attach(_grids_notebook, 0, 3, 4, 5,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
+ _page_grids.table().attach(_grids_notebook, 0, 3, 4, 5, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
}
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index 55f81cfaf..804a403f6 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -410,6 +410,7 @@ RegisteredSuffixedInteger::init (const Glib::ustring& label, const Glib::ustring
_label->set_alignment (1.0, 0.5);
_label->set_use_underline();
_sb = new Gtk::SpinButton (_adj, 1.0, 0);
+ _sb->set_numeric();
_label->set_mnemonic_widget (*_sb);
_suffix = new Gtk::Label (suffix);
_hbox.pack_start (*_sb, true, true, 0);
diff --git a/src/ui/widget/scalar.cpp b/src/ui/widget/scalar.cpp
index ae90e4a0f..743c879f0 100644
--- a/src/ui/widget/scalar.cpp
+++ b/src/ui/widget/scalar.cpp
@@ -40,6 +40,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip,
: Labelled(label, tooltip, new Gtk::SpinButton(), suffix, icon, mnemonic),
setProgrammatically(false)
{
+ static_cast<Gtk::SpinButton*>(_widget)->set_numeric();
}
/**
@@ -61,6 +62,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip,
: Labelled(label, tooltip, new Gtk::SpinButton(0.0, digits), suffix, icon, mnemonic),
setProgrammatically(false)
{
+ static_cast<Gtk::SpinButton*>(_widget)->set_numeric();
}
/**
@@ -84,6 +86,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip,
: Labelled(label, tooltip, new Gtk::SpinButton(adjust, 0.0, digits), suffix, icon, mnemonic),
setProgrammatically(false)
{
+ static_cast<Gtk::SpinButton*>(_widget)->set_numeric();
}
/** Fetches the precision of the spin buton */