[glom] Details: Avoid an outdent after group titles
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Details: Avoid an outdent after group titles
- Date: Mon, 17 Oct 2011 10:59:17 +0000 (UTC)
commit 015d5c58ea726318f34bda6003eaf38c603e593b
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 17 12:58:55 2011 +0200
Details: Avoid an outdent after group titles
* glom/mode_data/flowtablewithfields.cc: add_layout_group(): Work around
the GtkFrame bug #644199
ChangeLog | 7 +++++++
glom/mode_data/flowtablewithfields.cc | 16 ++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4c75e9e..1d56c5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-17 Murray Cumming <murrayc murrayc com>
+
+ Details: Avoid an outdent after group titles
+
+ * glom/mode_data/flowtablewithfields.cc: add_layout_group(): Work around
+ the GtkFrame bug #644199
+
1.19.13 (unstable):
2011-10-17 Murray Cumming <murrayc murrayc com>
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index cd48091..7531388 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -182,9 +182,21 @@ void FlowTableWithFields::add_layout_group(const sharedptr<LayoutGroup>& group,
Gtk::Alignment* alignment = Gtk::manage( new Gtk::Alignment ); //TODO_leak: This is possibly leaked, according to valgrind.
- if(!group->get_title().empty() && with_indent) //Don't indent if it has no title, to allow use of groups just for positioning.
+ if(!group->get_title().empty()) //Don't indent if it has no title, to allow use of groups just for positioning.
{
- alignment->set_padding(Glom::Utils::DEFAULT_SPACING_SMALL, 0, Glom::Utils::DEFAULT_SPACING_SMALL, 0);
+ //Add some indenting just to avoid the out-denting caused by this GtkFrame bug:
+ //https://bugzilla.gnome.org/show_bug.cgi?id=644199
+ const int BASE_INDENT = 3;
+
+ //std::cout << "title= " << group->get_title() << ", with_indent=" << with_indent << std::endl;
+ if(with_indent)
+ {
+ alignment->set_padding(Glom::Utils::DEFAULT_SPACING_SMALL, 0, Glom::Utils::DEFAULT_SPACING_SMALL + BASE_INDENT, 0);
+ }
+ else
+ {
+ alignment->set_padding(Glom::Utils::DEFAULT_SPACING_SMALL, 0, BASE_INDENT, 0);
+ }
}
alignment->show();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]