[glom] Print Layout: Improve the grid appearance.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Print Layout: Improve the grid appearance.
- Date: Mon, 8 Aug 2011 10:29:23 +0000 (UTC)
commit cbb549d2bf19e7c4bba6a3bf38d4092b67074790
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Aug 7 23:21:50 2011 +0200
Print Layout: Improve the grid appearance.
* glom/mode_design/print_layouts/window_print_layout_edit.cc:
on_menu_view_show_grid(): Use a smaller grid gap, which seems more useful.
* glom/utility_widgets/canvas/canvas_group_grid.cc:
create_rule_line(): Make the lines thinner and light blue instead of
gray.
ChangeLog | 10 ++++++++++
.../print_layouts/window_print_layout_edit.cc | 2 +-
glom/utility_widgets/canvas/canvas_group_grid.cc | 11 ++++++-----
3 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 93ebea6..0ec9a01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2011-08-07 Murray Cumming <murrayc murrayc com>
+ Print Layout: Improve the grid appearance.
+
+ * glom/mode_design/print_layouts/window_print_layout_edit.cc:
+ on_menu_view_show_grid(): Use a smaller grid gap, which seems more useful.
+ * glom/utility_widgets/canvas/canvas_group_grid.cc:
+ create_rule_line(): Make the lines thinner and light blue instead of
+ gray.
+
+2011-08-07 Murray Cumming <murrayc murrayc com>
+
CanvasGroupGrid: Simplify rule creation.
* glom/utility_widgets/canvas/canvas_group_grid.[h|cc]:
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index 924c722..3ab074f 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -837,7 +837,7 @@ void Window_PrintLayout_Edit::on_menu_view_show_grid()
{
if(m_action_showgrid->get_active())
{
- m_canvas.set_grid_gap(20);
+ m_canvas.set_grid_gap(5.0f);
}
else
{
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.cc b/glom/utility_widgets/canvas/canvas_group_grid.cc
index 18d521c..e15c418 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.cc
+++ b/glom/utility_widgets/canvas/canvas_group_grid.cc
@@ -27,6 +27,7 @@
namespace Glom
{
+const double LINE_WIDTH = 0.5f;
CanvasGroupGrid::CanvasGroupGrid()
: m_grid_gap(0.0),
@@ -169,7 +170,7 @@ void CanvasGroupGrid::snap_position(double& x, double& y) const
Glib::RefPtr<Goocanvas::Polyline> CanvasGroupGrid::create_rule_line(double x1, double y1, double x2, double y2)
{
Glib::RefPtr<Goocanvas::Polyline> line = Goocanvas::Polyline::create(x1, y1, x2, y2);
- line->property_line_width() = 0.5f;
+ line->property_line_width() = LINE_WIDTH;
line->property_stroke_color() = "green";
return line;
}
@@ -226,10 +227,10 @@ void CanvasGroupGrid::create_lines()
if(m_grid_gap > 0) //0 steps cause a crash in older versions of goocanvas.
{
m_grid_lines = Goocanvas::Grid::create(0, 0, width, height, m_grid_gap, m_grid_gap);
- m_grid_lines->property_horz_grid_line_width() = 1.0f;
- m_grid_lines->property_vert_grid_line_width() = 1.0f;
- m_grid_lines->property_horz_grid_line_color() = "gray";
- m_grid_lines->property_vert_grid_line_color() = "gray";
+ m_grid_lines->property_horz_grid_line_width() = LINE_WIDTH;
+ m_grid_lines->property_vert_grid_line_width() = LINE_WIDTH;
+ m_grid_lines->property_horz_grid_line_color() = "light blue";
+ m_grid_lines->property_vert_grid_line_color() = "light blue";
add_child(m_grid_lines);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]