[glom] Print Layout: Related records portals: Use the normal outline stroke.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Print Layout: Related records portals: Use the normal outline stroke.
- Date: Sat, 27 Aug 2011 15:16:45 +0000 (UTC)
commit 874ceb11d2510292119b4cdb955fa620b10e78a3
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Aug 27 17:16:39 2011 +0200
Print Layout: Related records portals: Use the normal outline stroke.
* glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Add
a static get_outline_stroke() method.
* glom/print_layout/canvas_layout_item.cc:
create_canvas_item_for_layout_item(): Use it here.
ChangeLog | 9 +++++++++
glom/print_layout/canvas_layout_item.cc | 10 +++++++---
.../canvas/canvas_group_resizable.cc | 6 ++++++
.../canvas/canvas_group_resizable.h | 3 +++
4 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index dc013da..fb3db5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-08-27 Murray Cumming <murrayc murrayc com>
+ Print Layout: Related records portals: Use the normal outline stroke.
+
+ * glom/utility_widgets/canvas/canvas_group_resizable.[h|cc]: Add
+ a static get_outline_stroke() method.
+ * glom/print_layout/canvas_layout_item.cc:
+ create_canvas_item_for_layout_item(): Use it here.
+
+2011-08-27 Murray Cumming <murrayc murrayc com>
+
Print Layouts: Default to 12-point text instead of 9.
* glom/mode_design/print_layouts/window_print_layout_edit.cc:
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index 4c70fa9..a50c189 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -280,9 +280,13 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
{
Glib::RefPtr<CanvasTableMovable> canvas_item = CanvasTableMovable::create();
- canvas_item->property_vert_grid_line_width() = 1;
- canvas_item->property_horz_grid_line_width() = 1;
- canvas_item->property_stroke_color() = "gray";
+ Glib::ustring stroke_color;
+ double stroke_width = 0;
+ CanvasGroupResizable::get_outline_stroke(stroke_color, stroke_width);
+
+ canvas_item->property_vert_grid_line_width() = stroke_width;
+ canvas_item->property_horz_grid_line_width() = stroke_width;
+ canvas_item->property_stroke_color() = stroke_color;
//Show as many rows as can fit in the height.
double row_height = 0;
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.cc b/glom/utility_widgets/canvas/canvas_group_resizable.cc
index 70c7077..9e188de 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.cc
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.cc
@@ -37,6 +37,12 @@ static const char MANIPULATOR_STROKE_COLOR[] = "black";
static const double OUTLINE_STROKE_WIDTH = MANIPULATOR_STROKE_WIDTH; //mm (assuming that the canvas uses mm.
static const char OUTLINE_STROKE_COLOR[] = "gray";
+void CanvasGroupResizable::get_outline_stroke(Glib::ustring& color, double& width)
+{
+ color = OUTLINE_STROKE_COLOR;
+ width = OUTLINE_STROKE_WIDTH;
+}
+
CanvasGroupResizable::CanvasGroupResizable()
: m_in_manipulator(false),
m_x(0), m_y(0), m_width(0), m_height(0)
diff --git a/glom/utility_widgets/canvas/canvas_group_resizable.h b/glom/utility_widgets/canvas/canvas_group_resizable.h
index 17f538e..98d7e11 100644
--- a/glom/utility_widgets/canvas/canvas_group_resizable.h
+++ b/glom/utility_widgets/canvas/canvas_group_resizable.h
@@ -73,6 +73,9 @@ public:
/// This signal is emitted when the canvas item is resized by the user.
type_signal_resized signal_resized();
+ //Get the outline details so they can be used elsewhere, for consistency.
+ static void get_outline_stroke(Glib::ustring& color, double& width);
+
private:
virtual void show_selected();
virtual Goocanvas::Canvas* get_parent_canvas_widget();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]