[glom] Document: Use CSS3 formatting for colors, via Gdk::RGBA.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Document: Use CSS3 formatting for colors, via Gdk::RGBA.
- Date: Mon, 26 Sep 2011 15:02:42 +0000 (UTC)
commit d942856c8d48ef89a0bde6694325c10897933e3d
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 26 16:36:23 2011 +0200
Document: Use CSS3 formatting for colors, via Gdk::RGBA.
* glom/mode_design/layout/dialog_layout_list_related.cc:
* glom/mode_design/layout/layout_item_dialogs/box_formatting.cc:
* glom/mode_design/layout/layout_item_dialogs/dialog_line.cc:
* glom/utility_widgets/canvas/canvas_line_movable.[h|cc]: Use Gdk::RGBA
instead of Gdk::RGBA everywhere now that goocanvas(mm) supports it.
ChangeLog | 10 ++++++++++
glom/libglom/document/document.cc | 3 ++-
.../layout/dialog_layout_list_related.cc | 4 ++--
.../layout/layout_item_dialogs/box_formatting.cc | 4 ++--
.../layout/layout_item_dialogs/dialog_line.cc | 5 ++---
glom/utility_widgets/canvas/canvas_line_movable.cc | 4 ++--
glom/utility_widgets/canvas/canvas_line_movable.h | 2 +-
7 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4dea02d..c318312 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2011-09-26 Murray Cumming <murrayc murrayc com>
+ Document: Use CSS3 formatting for colors, via Gdk::RGBA.
+
+ * glom/mode_design/layout/dialog_layout_list_related.cc:
+ * glom/mode_design/layout/layout_item_dialogs/box_formatting.cc:
+ * glom/mode_design/layout/layout_item_dialogs/dialog_line.cc:
+ * glom/utility_widgets/canvas/canvas_line_movable.[h|cc]: Use Gdk::RGBA
+ instead of Gdk::RGBA everywhere now that goocanvas(mm) supports it.
+
+2011-09-26 Murray Cumming <murrayc murrayc com>
+
Related Records: Do not try to navigate to an empty record.
* glom/mode_data/box_data_list_related.cc: on_adddel_user_requested_edit():
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index 7bbf76f..96abf41 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -4395,8 +4395,9 @@ guint Document::get_latest_known_document_format_version()
// Version 4: (Glom 1.12). Portal navigation options were simplified, with a "none" option. network_sharing was added, defaulting to off.
// Version 5: (Glom 1.14). Extra layout item formatting options were added, plus a startup script.
// Version 6: (Glom 1.16). Extra show_all option for choices that show related records. Extra related choice fields are now a layout group instead of just a second field name.
+ // Version 7: (Glom 1.20). New print layout details. Related records: Number of rows can be specified. All colors can now be in CSS3 string format (via GdkRGBA)
- return 6;
+ return 7;
}
std::vector<Glib::ustring> Document::get_library_module_names() const
diff --git a/glom/mode_design/layout/dialog_layout_list_related.cc b/glom/mode_design/layout/dialog_layout_list_related.cc
index cea7ccf..502d2ee 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.cc
+++ b/glom/mode_design/layout/dialog_layout_list_related.cc
@@ -144,8 +144,8 @@ void Dialog_Layout_List_Related::set_document(const Glib::ustring& layout_name,
m_spinbutton_column_line_width->set_value(
portal->get_print_layout_column_line_width());
- Gdk::Color color( portal->get_print_layout_line_color() );
- m_colorbutton_line->set_color(color);
+ const Gdk::RGBA color( portal->get_print_layout_line_color() );
+ m_colorbutton_line->set_rgba(color);
//Avoid showing formatting options that are about editing:
m_editable_layout = false;
diff --git a/glom/mode_design/layout/layout_item_dialogs/box_formatting.cc b/glom/mode_design/layout/layout_item_dialogs/box_formatting.cc
index 158be14..9364102 100644
--- a/glom/mode_design/layout/layout_item_dialogs/box_formatting.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/box_formatting.cc
@@ -245,11 +245,11 @@ void Box_Formatting::set_formatting_for_non_field(const FieldFormatting& format,
const Glib::ustring color_foreground = format.get_text_format_color_foreground();
m_checkbox_format_text_color_foreground->set_active(!color_foreground.empty());
- m_colorbutton_foreground->set_color( Gdk::Color(color_foreground) );
+ m_colorbutton_foreground->set_rgba( Gdk::RGBA(color_foreground) );
const Glib::ustring color_background = format.get_text_format_color_background();
m_checkbox_format_text_color_background->set_active(!color_background.empty());
- m_colorbutton_background->set_color( Gdk::Color(color_background) );
+ m_colorbutton_background->set_rgba( Gdk::RGBA(color_background) );
//Choices:
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
index de0bc5d..fd0705f 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_line.cc
@@ -64,9 +64,8 @@ void Dialog_Line::set_line(const sharedptr<const LayoutItem_Line>& line)
m_spinbutton_line_width->set_value(line->get_line_width());
- //TODO: Use GdkRGBA's color string (CSS) format instead, everywhere:
- Gdk::Color color( line->get_line_color() );
- m_colorbutton->set_color(color);
+ const Gdk::RGBA color( line->get_line_color() );
+ m_colorbutton->set_rgba(color);
//set_blocked(false);
diff --git a/glom/utility_widgets/canvas/canvas_line_movable.cc b/glom/utility_widgets/canvas/canvas_line_movable.cc
index 62988b3..4622528 100644
--- a/glom/utility_widgets/canvas/canvas_line_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_line_movable.cc
@@ -90,7 +90,7 @@ bool CanvasLineMovable::on_enter_notify_event(const Glib::RefPtr<Item>& target,
{
if(!m_hover_color.empty())
{
- m_stroke_color = property_stroke_color_rgba();
+ m_stroke_color = property_stroke_color_gdk_rgba();
property_stroke_color() = m_hover_color;
}
@@ -101,7 +101,7 @@ bool CanvasLineMovable::on_enter_notify_event(const Glib::RefPtr<Item>& target,
bool CanvasLineMovable::on_leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event)
{
if(!m_hover_color.empty())
- property_stroke_color_rgba() = m_stroke_color;
+ property_stroke_color_gdk_rgba() = m_stroke_color;
CanvasItemMovable::on_leave_notify_event(target, event);
return Goocanvas::Polyline::on_leave_notify_event(target, event);
diff --git a/glom/utility_widgets/canvas/canvas_line_movable.h b/glom/utility_widgets/canvas/canvas_line_movable.h
index 75be468..6eb301a 100644
--- a/glom/utility_widgets/canvas/canvas_line_movable.h
+++ b/glom/utility_widgets/canvas/canvas_line_movable.h
@@ -52,7 +52,7 @@ private:
virtual bool on_enter_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
virtual bool on_leave_notify_event(const Glib::RefPtr<Item>& target, GdkEventCrossing* event);
- guint m_stroke_color;
+ Gdk::RGBA m_stroke_color;
Glib::ustring m_hover_color;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]