aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-05-08 04:47:57 +0800
committerFederico Mena Quintero <federico@novell.com>2010-05-08 04:47:57 +0800
commit5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc (patch)
tree830b7422fdb06a1fe75bf94e79e3e0699b268126 /composer
parentf9352579b48ee7a697979e3f7043399097652cd9 (diff)
downloadgsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar.gz
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar.bz2
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar.lz
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar.xz
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.tar.zst
gsoc2013-evolution-5b75d85a0c6f76a8c13bfdc335fdffd14272a6fc.zip
Pack the header-table's headers closer together for small screens
Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-header-table.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 8a252c66e2..b7f2e8e437 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -502,6 +502,17 @@ composer_header_table_from_changed_cb (EComposerHeaderTable *table)
composer_header_table_setup_mail_headers (table);
}
+static int
+get_row_padding (void)
+{
+ /* For small screens, make the header-table's rows be packed closely together */
+
+ if (e_msg_composer_get_lite ())
+ return 0;
+ else
+ return 3;
+}
+
static GObject *
composer_header_table_constructor (GType type,
guint n_construct_properties,
@@ -510,6 +521,7 @@ composer_header_table_constructor (GType type,
GObject *object;
EComposerHeaderTablePrivate *priv;
guint rows, ii;
+ int row_padding;
/* Chain up to parent's constructor() method. */
object = G_OBJECT_CLASS (parent_class)->constructor (
@@ -525,14 +537,16 @@ composer_header_table_constructor (GType type,
/* Use "ypadding" instead of "row-spacing" because some rows may
* be invisible and we don't want spacing around them. */
+ row_padding = get_row_padding ();
+
for (ii = 0; ii < rows; ii++) {
gtk_table_attach (
GTK_TABLE (object), priv->headers[ii]->title_widget,
- 0, 1, ii, ii + 1, GTK_FILL, GTK_FILL, 0, 3);
+ 0, 1, ii, ii + 1, GTK_FILL, GTK_FILL, 0, row_padding);
gtk_table_attach (
GTK_TABLE (object),
priv->headers[ii]->input_widget, 1, 4,
- ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
+ ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, row_padding);
}
ii = E_COMPOSER_HEADER_FROM;
@@ -555,10 +569,10 @@ composer_header_table_constructor (GType type,
if (!e_msg_composer_get_lite ()) {
gtk_table_attach (
GTK_TABLE (object), priv->signature_label,
- 2, 3, ii, ii + 1, 0, 0, 0, 3);
+ 2, 3, ii, ii + 1, 0, 0, 0, row_padding);
gtk_table_attach (
GTK_TABLE (object), priv->signature_combo_box,
- 3, 4, ii, ii + 1, e_msg_composer_get_lite () ? GTK_FILL: 0, 0, 0, 3);
+ 3, 4, ii, ii + 1, e_msg_composer_get_lite () ? GTK_FILL: 0, 0, 0, row_padding);
} else {
GtkWidget *box = gtk_hbox_new (FALSE, 0);
@@ -571,7 +585,7 @@ composer_header_table_constructor (GType type,
g_object_set_data (G_OBJECT (box), "pdata", object);
gtk_table_attach (
GTK_TABLE (object), box,
- 3, 4, ii, ii + 1, GTK_FILL, 0, 0, 3);
+ 3, 4, ii, ii + 1, GTK_FILL, 0, 0, row_padding);
gtk_widget_hide (box);
}