summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2003-09-24 23:35:55 +0000
committerGeorge Lebl <jirka@src.gnome.org>2003-09-24 23:35:55 +0000
commit1b11a31256fe329144418cba7ef4137596fb4771 (patch)
tree0e1d0121ab1dbb214007b74ac142334b97c67a07
parent3be4bed1ac236af772aedc81daf8c2c9e97032ae (diff)
downloadgdm-1b11a31256fe329144418cba7ef4137596fb4771.tar.gz
rework the text wrapping stuff. Now we use pango to figure out where
Wed Sep 24 16:34:02 2003 George Lebl <jirka@5z.com> * gui/greeter/greeter_item_pam.c, gui/greeter/greeter_geometry.c, gui/greeter/greeter_canvas_item.[ch]: rework the text wrapping stuff. Now we use pango to figure out where breaks should be and then do a pretty stupid algorithm to break the string at the requested length. This works better it seems and isn't perhaps on as much crack as messing with the canvas text items pango layout. It's still on crack however.
-rw-r--r--ChangeLog10
-rw-r--r--gui/greeter/greeter_canvas_item.c253
-rw-r--r--gui/greeter/greeter_canvas_item.h9
-rw-r--r--gui/greeter/greeter_geometry.c28
-rw-r--r--gui/greeter/greeter_geometry.h5
-rw-r--r--gui/greeter/greeter_item_pam.c16
-rw-r--r--gui/greeter/themes/circles/circles.xml.in44
-rw-r--r--gui/greeter/themes/happygnome-list/happygnome.xml.in44
-rw-r--r--gui/greeter/themes/happygnome/happygnome.xml.in44
9 files changed, 291 insertions, 162 deletions
diff --git a/ChangeLog b/ChangeLog
index 961de5ba..8cf4ba7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Wed Sep 24 16:34:02 2003 George Lebl <jirka@5z.com>
+
+ * gui/greeter/greeter_item_pam.c, gui/greeter/greeter_geometry.c,
+ gui/greeter/greeter_canvas_item.[ch]: rework the text wrapping
+ stuff. Now we use pango to figure out where breaks should be
+ and then do a pretty stupid algorithm to break the string at
+ the requested length. This works better it seems and isn't
+ perhaps on as much crack as messing with the canvas text items
+ pango layout. It's still on crack however.
+
Wed Sep 24 13:21:43 2003 George Lebl <jirka@5z.com>
* daemon/slave.c: don't exec chooser/greeter in shell that's kind of
diff --git a/gui/greeter/greeter_canvas_item.c b/gui/greeter/greeter_canvas_item.c
index 368c9e32..5b158b41 100644
--- a/gui/greeter/greeter_canvas_item.c
+++ b/gui/greeter/greeter_canvas_item.c
@@ -174,76 +174,10 @@ get_gdk_color_from_rgb (GdkColor *c, guint32 rgb)
}
void
-greeter_item_recreate_label (GreeterItemInfo *item, const char *text, gboolean markup)
-{
- GtkJustification just;
- GnomeCanvasGroup *group;
- double x1, y1, x2, y2;
- GtkAllocation rect;
- int width, height;
-
- if ( ! greeter_item_is_visible (item))
- return;
-
- rect = item->allocation;
-
- x1 = (gdouble) rect.x;
- y1 = (gdouble) rect.y;
- x2 = (gdouble) rect.x + rect.width;
- y2 = (gdouble) rect.y + rect.height;
-
- group = item->group_item;
- if (group == NULL)
- group = item->parent->group_item;
-
- if (item->item != NULL)
- gtk_object_destroy (GTK_OBJECT (item->item));
-
- /* Justification is taken from the anchor */
- if (item->anchor == GTK_ANCHOR_NORTH_WEST ||
- item->anchor == GTK_ANCHOR_SOUTH_WEST ||
- item->anchor == GTK_ANCHOR_WEST) {
- just = GTK_JUSTIFY_LEFT;
- } else if (item->anchor == GTK_ANCHOR_NORTH_EAST ||
- item->anchor == GTK_ANCHOR_SOUTH_EAST ||
- item->anchor == GTK_ANCHOR_EAST) {
- just = GTK_JUSTIFY_RIGHT;
- } else {
- just = GTK_JUSTIFY_CENTER;
- }
-
- item->item = gnome_canvas_item_new (group,
- GNOME_TYPE_CANVAS_TEXT,
- markup ? "markup" : "text", text,
- "x", x1,
- "y", y1,
- "anchor", item->anchor,
- "font_desc", item->data.text.fonts[GREETER_ITEM_STATE_NORMAL],
- "fill_color_rgba", item->data.text.colors[GREETER_ITEM_STATE_NORMAL],
- "justification", just,
- NULL);
-
-
- pango_layout_get_pixel_size (GNOME_CANVAS_TEXT (item->item)->layout, &width, &height);
-
- if (item->data.text.real_max_width > 0 &&
- width > item->data.text.real_max_width) {
- pango_layout_set_wrap (GNOME_CANVAS_TEXT (item->item)->layout, PANGO_WRAP_WORD_CHAR);
- pango_layout_set_width (GNOME_CANVAS_TEXT (item->item)->layout,
- (item->data.text.real_max_width * PANGO_SCALE) - PANGO_SCALE/2);
- }
-
- /* Hack, we may have done something to the layout this will force
- a redraw using the new layout thingie */
- gnome_canvas_item_set (item->item,
- "justification", just,
- NULL);
-}
-
-void
greeter_item_create_canvas_item (GreeterItemInfo *item)
{
GnomeCanvasGroup *group;
+ GtkJustification just;
GtkWidget *entry;
GtkWidget *list;
GtkWidget *swin;
@@ -346,7 +280,38 @@ greeter_item_create_canvas_item (GreeterItemInfo *item)
break;
case GREETER_ITEM_TYPE_LABEL:
text = greeter_item_expand_text (item->data.text.orig_text);
- greeter_item_recreate_label (item, text, TRUE /* markup */);
+
+ /* Justification is taken from the anchor */
+ if (item->anchor == GTK_ANCHOR_NORTH_WEST ||
+ item->anchor == GTK_ANCHOR_SOUTH_WEST ||
+ item->anchor == GTK_ANCHOR_WEST)
+ just = GTK_JUSTIFY_LEFT;
+ else if (item->anchor == GTK_ANCHOR_NORTH_EAST ||
+ item->anchor == GTK_ANCHOR_SOUTH_EAST ||
+ item->anchor == GTK_ANCHOR_EAST)
+ just = GTK_JUSTIFY_RIGHT;
+ else
+ just = GTK_JUSTIFY_CENTER;
+
+ item->item = gnome_canvas_item_new (group,
+ GNOME_TYPE_CANVAS_TEXT,
+ "text", "",
+ "x", x1,
+ "y", y1,
+ "anchor", item->anchor,
+ "font_desc", item->data.text.fonts[GREETER_ITEM_STATE_NORMAL],
+ "fill_color_rgba", item->data.text.colors[GREETER_ITEM_STATE_NORMAL],
+ "justification", just,
+ NULL);
+
+ greeter_canvas_item_break_set_string (item,
+ text,
+ TRUE /* markup */,
+ item->data.text.real_max_width,
+ NULL /* width */,
+ NULL /* height */,
+ NULL /* canvas */,
+ item->item);
g_free (text);
/* if there is an accelerator we do an INCREDIBLE hack */
@@ -456,3 +421,155 @@ greeter_item_create_canvas_item (GreeterItemInfo *item)
item);
}
+static gboolean
+append_word (GString *str, GString *line, GString *word, int max_width, const char *textattr, GnomeCanvasItem *canvas_item)
+{
+ int width, height;
+ char *try = g_strconcat (line->str, word->str, NULL);
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (canvas_item), textattr, try, NULL);
+ g_free (try);
+
+ pango_layout_get_pixel_size (GNOME_CANVAS_TEXT (canvas_item)->layout, &width, &height);
+
+
+ if (width > max_width) {
+ if ( ! ve_string_empty (line->str)) {
+ if (str->len > 0 &&
+ str->str[str->len-1] == ' ') {
+ g_string_truncate (str, str->len-1);
+ }
+ g_string_append_unichar (str, '\n');
+ }
+ g_string_assign (line, word->str);
+ g_string_append (str, word->str);
+ g_string_assign (word, "");
+
+ return TRUE;
+ } else {
+ g_string_append (line, word->str);
+ g_string_append (str, word->str);
+ g_string_assign (word, "");
+
+ return FALSE;
+ }
+}
+
+void
+greeter_canvas_item_break_set_string (GreeterItemInfo *info,
+ const char *orig,
+ gboolean markup,
+ int max_width,
+ int *width,
+ int *height,
+ GnomeCanvas *canvas,
+ GnomeCanvasItem *real_item)
+{
+ PangoLogAttr *attrs;
+ int n_chars;
+ GString *str;
+ GString *word;
+ GString *line;
+ int i;
+ int n_attrs;
+ int ia;
+ const char *p;
+ int in_current_row;
+ GnomeCanvasItem *canvas_item;
+ const char *textattr = markup ? "markup" : "text";
+
+ str = g_string_new (NULL);
+ word = g_string_new (NULL);
+ line = g_string_new (NULL);
+
+ /* A gross hack */
+ if (real_item != NULL)
+ canvas_item = real_item;
+ else
+ canvas_item = gnome_canvas_item_new (gnome_canvas_root (canvas),
+ GNOME_TYPE_CANVAS_TEXT,
+ textattr, "",
+ "x", 0.0,
+ "y", 0.0,
+ "font_desc", info->data.text.fonts[GREETER_ITEM_STATE_NORMAL],
+ NULL);
+
+ if (max_width == 0) {
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (canvas_item), textattr, orig, NULL);
+ pango_layout_get_pixel_size (GNOME_CANVAS_TEXT (canvas_item)->layout, width, height);
+
+ if (real_item != canvas_item)
+ gtk_object_destroy (GTK_OBJECT (canvas_item));
+ return;
+ }
+
+ n_chars = g_utf8_strlen (orig, -1);
+
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (canvas_item), textattr, orig, NULL);
+ pango_layout_get_log_attrs (GNOME_CANVAS_TEXT (canvas_item)->layout, &attrs, &n_attrs);
+
+ i = 0;
+ ia = 0;
+ in_current_row = 0;
+ p = orig;
+ while (i < n_chars) {
+ gunichar ch;
+
+ ch = g_utf8_get_char (p);
+
+ if (markup && ch == '<') {
+ while (i < n_chars) {
+ g_string_append_unichar (word, ch);
+ p = g_utf8_next_char (p);
+ i ++;
+
+ if (ch == '>') {
+ ch = g_utf8_get_char (p);
+ break;
+ } else {
+ ch = g_utf8_get_char (p);
+ }
+ }
+ if (i >= n_chars)
+ break;
+ }
+
+ if (attrs[ia].is_line_break && in_current_row > 0) {
+ if (append_word (str, line, word, max_width, textattr, canvas_item))
+ in_current_row = 0;
+ }
+
+ in_current_row ++;
+ g_string_append_unichar (word, ch);
+
+ p = g_utf8_next_char (p);
+ i ++;
+ ia ++;
+
+ /* eeek! */
+ if (ia >= n_attrs) {
+ while (i < n_chars) {
+ ch = g_utf8_get_char (p);
+ g_string_append_unichar (word, ch);
+ p = g_utf8_next_char (p);
+ i ++;
+ }
+ break;
+ }
+ }
+
+ if ( ! ve_string_empty (word->str))
+ append_word (str, line, word, max_width, textattr, canvas_item);
+
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM (canvas_item), textattr, str->str, NULL);
+ pango_layout_get_pixel_size (GNOME_CANVAS_TEXT (canvas_item)->layout, width, height);
+
+ if (real_item != canvas_item)
+ gtk_object_destroy (GTK_OBJECT (canvas_item));
+ g_free (attrs);
+
+ g_string_free (line, TRUE);
+ g_string_free (word, TRUE);
+
+ g_string_free (str, TRUE);
+}
+
diff --git a/gui/greeter/greeter_canvas_item.h b/gui/greeter/greeter_canvas_item.h
index 99be6de3..1b9f3b7b 100644
--- a/gui/greeter/greeter_canvas_item.h
+++ b/gui/greeter/greeter_canvas_item.h
@@ -3,6 +3,13 @@
void greeter_item_create_canvas_item (GreeterItemInfo *item);
-void greeter_item_recreate_label (GreeterItemInfo *item, const char *text, gboolean markup);
+void greeter_canvas_item_break_set_string (GreeterItemInfo *info,
+ const char *orig,
+ gboolean markup,
+ int max_width,
+ int *width,
+ int *height,
+ GnomeCanvas *canvas,
+ GnomeCanvasItem *real_item);
#endif /* GREETER_CANVAS_ITEM_H */
diff --git a/gui/greeter/greeter_geometry.c b/gui/greeter/greeter_geometry.c
index 145ee772..b7a1d438 100644
--- a/gui/greeter/greeter_geometry.c
+++ b/gui/greeter/greeter_geometry.c
@@ -484,7 +484,6 @@ greeter_item_size_request (GreeterItemInfo *item,
if (item->item_type == GREETER_ITEM_TYPE_LABEL)
{
- GnomeCanvasItem *canvas_item;
int width, height;
char *text;
int max_width = G_MAXINT;
@@ -494,14 +493,7 @@ greeter_item_size_request (GreeterItemInfo *item,
* Move Along
*/
text = greeter_item_expand_text (item->data.text.orig_text);
-
- canvas_item = gnome_canvas_item_new (gnome_canvas_root (canvas),
- GNOME_TYPE_CANVAS_TEXT,
- "markup", text,
- "x", 0.0,
- "y", 0.0,
- "font_desc", item->data.text.fonts[GREETER_ITEM_STATE_NORMAL],
- NULL);
+
if (set_width > 0)
max_width = set_width;
@@ -512,20 +504,18 @@ greeter_item_size_request (GreeterItemInfo *item,
if (item->data.text.max_screen_percent_width/100.0 * gdm_wm_screen.width < max_width)
max_width = item->data.text.max_screen_percent_width/100.0 * gdm_wm_screen.width;
- if (max_width < G_MAXINT) {
- pango_layout_set_wrap (GNOME_CANVAS_TEXT (canvas_item)->layout, PANGO_WRAP_WORD_CHAR);
- pango_layout_set_width (GNOME_CANVAS_TEXT (canvas_item)->layout, (max_width * PANGO_SCALE) - PANGO_SCALE/2);
- /* HACK: this forces the thing to relayout */
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (canvas_item), "justification", GTK_JUSTIFY_CENTER, NULL);
- update_real_max_width (item, max_width);
- }
-
- pango_layout_get_pixel_size (GNOME_CANVAS_TEXT (canvas_item)->layout, &width, &height);
+ greeter_canvas_item_break_set_string (item,
+ text,
+ TRUE /* markup */,
+ max_width,
+ &width,
+ &height,
+ canvas,
+ NULL /* real_item */);
req->width = width;
req->height = height;
- gtk_object_destroy (GTK_OBJECT (canvas_item));
g_free (text);
}
diff --git a/gui/greeter/greeter_geometry.h b/gui/greeter/greeter_geometry.h
index cd40b380..abde1a75 100644
--- a/gui/greeter/greeter_geometry.h
+++ b/gui/greeter/greeter_geometry.h
@@ -1,4 +1,9 @@
+#ifndef GREETER_GEOMETRY_H
+#define GREETER_GEOMETRY_H
+
#include "greeter_item.h"
void greeter_layout (GreeterItemInfo *root_item,
GnomeCanvas *canvas);
+
+#endif
diff --git a/gui/greeter/greeter_item_pam.c b/gui/greeter/greeter_item_pam.c
index 71dc2e0f..59dee926 100644
--- a/gui/greeter/greeter_item_pam.c
+++ b/gui/greeter/greeter_item_pam.c
@@ -60,14 +60,14 @@ evil (GtkEntry *entry, const char *user)
static void
set_text (GreeterItemInfo *info, const char *text)
{
- greeter_item_recreate_label (info, text, FALSE /* markup */);
- /*
- g_object_set (G_OBJECT (info->item),
- "text", text,
- "font_desc", info->data.text.fonts[info->state],
- "justification", GTK_JUSTIFY_CENTER,
- NULL);
- */
+ greeter_canvas_item_break_set_string (info,
+ text,
+ FALSE /* markup */,
+ info->data.text.real_max_width,
+ NULL /* width */,
+ NULL /* height */,
+ NULL /* canvas */,
+ info->item);
}
static void
diff --git a/gui/greeter/themes/circles/circles.xml.in b/gui/greeter/themes/circles/circles.xml.in
index 21f69e9c..078b79c8 100644
--- a/gui/greeter/themes/circles/circles.xml.in
+++ b/gui/greeter/themes/circles/circles.xml.in
@@ -24,9 +24,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Language -->
<stock type="language"/>
@@ -44,9 +44,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Session -->
<stock type="session"/>
@@ -65,9 +65,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Actions -->
<stock type="system"/>
@@ -86,18 +86,18 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: D_isconnect -->
<stock type="disconnect"/>
<show modes="remote"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Quit -->
<stock type="quit"/>
@@ -114,7 +114,7 @@
<pos x="100%" y="100%" anchor="se"/>
</item>
<item type="label" id="clock">
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="-20" y="-37" anchor="e"/>
<text>%c</text>
</item>
@@ -124,7 +124,7 @@
<pos anchor="c" x="50%" y="75%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: You've got capslock on! -->
<stock type="caps-lock-warning"/>
@@ -138,7 +138,7 @@
<pos anchor="c" x="50%" y="25%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label" id="timed-label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: User %s will login in %d seconds -->
<stock type="timed-label"/>
@@ -152,13 +152,13 @@
<box orientation="vertical" min-width="340" xpadding="30" ypadding="30" spacing="10">
<item type="label">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 18"/>
+ <normal color="#000000" font="Sans 14"/>
<!-- Stock label for: Welcome to %h -->
<stock type="welcome-label"/>
</item>
<item type="label" id="pam-prompt">
<pos anchor="nw" x="10%"/>
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<!-- Stock label for: Username: -->
<stock type="username-label"/>
</item>
@@ -173,14 +173,14 @@
</item>
<item type="label" id="pam-message">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</box>
<fixed>
<item type="label" id="pam-error">
<pos anchor="n" x="50%" y="110%"/>
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</fixed>
diff --git a/gui/greeter/themes/happygnome-list/happygnome.xml.in b/gui/greeter/themes/happygnome-list/happygnome.xml.in
index 015048b5..3e8bc5e1 100644
--- a/gui/greeter/themes/happygnome-list/happygnome.xml.in
+++ b/gui/greeter/themes/happygnome-list/happygnome.xml.in
@@ -24,9 +24,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Language -->
<stock type="language"/>
@@ -44,9 +44,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Session -->
<stock type="session"/>
@@ -65,9 +65,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Actions -->
<stock type="system"/>
@@ -86,18 +86,18 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: D_isconnect -->
<stock type="disconnect"/>
<show modes="remote"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Quit -->
<stock type="quit"/>
@@ -114,7 +114,7 @@
<pos x="-10" y="-10" anchor="se"/>
</item>
<item type="label" id="clock">
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="-160" y="-37" anchor="e"/>
<text>%c</text>
</item>
@@ -124,7 +124,7 @@
<pos anchor="c" x="75%" y="75%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: You've got capslock on! -->
<stock type="caps-lock-warning"/>
@@ -138,7 +138,7 @@
<pos anchor="c" x="75%" y="25%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label" id="timed-label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: User %s will login in %d seconds -->
<stock type="timed-label"/>
@@ -168,13 +168,13 @@
<box orientation="vertical" min-width="340" xpadding="30" ypadding="30" spacing="10">
<item type="label">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 18"/>
+ <normal color="#000000" font="Sans 14"/>
<!-- Stock label for: Welcome to %h -->
<stock type="welcome-label"/>
</item>
<item type="label" id="pam-prompt">
<pos anchor="nw" x="10%"/>
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<!-- Stock label for: Username: -->
<stock type="username-label"/>
</item>
@@ -189,14 +189,14 @@
</item>
<item type="label" id="pam-message">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</box>
<fixed>
<item type="label" id="pam-error">
<pos anchor="n" x="50%" y="110%"/>
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</fixed>
diff --git a/gui/greeter/themes/happygnome/happygnome.xml.in b/gui/greeter/themes/happygnome/happygnome.xml.in
index 87927368..278f98cb 100644
--- a/gui/greeter/themes/happygnome/happygnome.xml.in
+++ b/gui/greeter/themes/happygnome/happygnome.xml.in
@@ -24,9 +24,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Language -->
<stock type="language"/>
@@ -44,9 +44,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Session -->
<stock type="session"/>
@@ -65,9 +65,9 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Actions -->
<stock type="system"/>
@@ -86,18 +86,18 @@
<pos y="50%" anchor="w"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: D_isconnect -->
<stock type="disconnect"/>
<show modes="remote"/>
</item>
<item type="label">
- <normal color="#000000" font="Sans 14"/>
- <prelight color="#666666" font="Sans 14"/>
- <active color="#ff0000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
+ <prelight color="#666666" font="Sans 12"/>
+ <active color="#ff0000" font="Sans 12"/>
<pos y="50%" anchor="w"/>
<!-- Stock label for: _Quit -->
<stock type="quit"/>
@@ -114,7 +114,7 @@
<pos x="-10" y="-10" anchor="se"/>
</item>
<item type="label" id="clock">
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="-160" y="-37" anchor="e"/>
<text>%c</text>
</item>
@@ -124,7 +124,7 @@
<pos anchor="c" x="50%" y="75%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: You've got capslock on! -->
<stock type="caps-lock-warning"/>
@@ -138,7 +138,7 @@
<pos anchor="c" x="50%" y="25%" width="box" height="box"/>
<box orientation="vertical" min-width="400" xpadding="10" ypadding="5" spacing="0">
<item type="label" id="timed-label">
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<pos x="50%" anchor="n"/>
<!-- Stock label for: User %s will login in %d seconds -->
<stock type="timed-label"/>
@@ -152,13 +152,13 @@
<box orientation="vertical" min-width="340" xpadding="30" ypadding="30" spacing="10">
<item type="label">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 18"/>
+ <normal color="#000000" font="Sans 14"/>
<!-- Stock label for: Welcome to %h -->
<stock type="welcome-label"/>
</item>
<item type="label" id="pam-prompt">
<pos anchor="nw" x="10%"/>
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<!-- Stock label for: Username: -->
<stock type="username-label"/>
</item>
@@ -173,14 +173,14 @@
</item>
<item type="label" id="pam-message">
<pos anchor="n" x="50%"/>
- <normal color="#000000" font="Sans 14"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</box>
<fixed>
<item type="label" id="pam-error">
<pos anchor="n" x="50%" y="110%"/>
- <normal color="#000000" font="Sans 16"/>
+ <normal color="#000000" font="Sans 12"/>
<text></text>
</item>
</fixed>