[glom] Print Layout: Use foregroud colors from the text/field formatting.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Print Layout: Use foregroud colors from the text/field formatting.
- Date: Tue, 20 Sep 2011 19:06:00 +0000 (UTC)
commit f1df27e0f2607b5899ef81d43c4622f927ae1a0e
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 19 22:55:30 2011 +0200
Print Layout: Use foregroud colors from the text/field formatting.
* glom/print_layout/canvas_layout_item.cc: apply_formatting():
Correctly use the foreground color, though the background color is not
used yet.
ChangeLog | 8 ++++++++
glom/print_layout/canvas_layout_item.cc | 7 ++++---
glom/utility_widgets/canvas/canvas_text_movable.h | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2572347..d02f137 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,14 @@
2011-09-19 Murray Cumming <murrayc murrayc com>
+ Print Layout: Use foregroud colors from the text/field formatting.
+
+ * glom/print_layout/canvas_layout_item.cc: apply_formatting():
+ Correctly use the foreground color, though the background color is not
+ used yet.
+
+2011-09-19 Murray Cumming <murrayc murrayc com>
+
Print Layout: Use the correct numeric formatting.
* glom/print_layout/canvas_print_layout.cc: set_canvas_item_field_value():
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index 7feca5c..104a1f7 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -107,13 +107,14 @@ void CanvasLayoutItem::apply_formatting(const Glib::RefPtr<CanvasTextMovable>& c
const Glib::ustring fg = formatting.get_text_format_color_foreground();
if(!fg.empty())
{
- canvas_item->property_stroke_color() = fg;
+ //GooCanvasText uses fill-color for the text foreground color.
+ //Presumably stroke-color would be an outline, if we had a line-width of >0 width.
+ canvas_item->property_fill_color() = fg;
}
-
const Glib::ustring bg = formatting.get_text_format_color_background();
if(!bg.empty())
{
- canvas_item->property_fill_color() = bg;
+ //TODO: Add a filled rectangle.
}
}
diff --git a/glom/utility_widgets/canvas/canvas_text_movable.h b/glom/utility_widgets/canvas/canvas_text_movable.h
index ee94a99..597351a 100644
--- a/glom/utility_widgets/canvas/canvas_text_movable.h
+++ b/glom/utility_widgets/canvas/canvas_text_movable.h
@@ -79,7 +79,7 @@ private:
//What corner is considered when snapping to a grid while moving:
Corners m_snap_corner;
- //We rememeber this so we can reconstruct the pango markup when the text size changes:
+ //We remember this so we can reconstruct the pango markup when the text size changes:
Glib::ustring m_text;
Glib::ustring m_font;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]