diff options
author | Nikias Bassen | 2010-07-23 15:23:50 +0200 |
---|---|---|
committer | Nikias Bassen | 2010-07-23 15:23:50 +0200 |
commit | 9ccc5d8bec3694276e79cae96f69a2ba7cc48acb (patch) | |
tree | 59d2a11bd89c75ccd22bf9f1e51b5481e4ccc2f9 | |
parent | f79ee8a08df6478bf11179805323a28081cdfc0d (diff) | |
download | sbmanager-9ccc5d8bec3694276e79cae96f69a2ba7cc48acb.tar.gz sbmanager-9ccc5d8bec3694276e79cae96f69a2ba7cc48acb.tar.bz2 |
Make the folder label edit box look more like a real edit box
-rw-r--r-- | src/gui.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -885,7 +885,7 @@ static gboolean folderview_close_finish(gpointer user_data) { SBItem *item = (SBItem*)user_data; - ClutterActor *label = clutter_group_get_nth_child(CLUTTER_GROUP(folder), 1); + ClutterActor *label = clutter_group_get_nth_child(CLUTTER_GROUP(folder), 2); const gchar *oldname = clutter_text_get_text(CLUTTER_TEXT(item->label)); const gchar *newname = clutter_text_get_text(CLUTTER_TEXT(label)); @@ -1098,12 +1098,20 @@ static void folderview_open(SBItem *item) clutter_actor_show(act); /* create folder name label */ + ClutterColor rcolor = {255, 255, 255, 255}; + ClutterActor *trect = clutter_rectangle_new_with_color(&rcolor); + clutter_container_add_actor(CLUTTER_CONTAINER(folder), trect); + clutter_actor_set_position(trect, 16.0, 8.0); + clutter_actor_set_size(trect, (gfloat)(STAGE_WIDTH)-32.0, 24.0); + const gchar *ltext = clutter_text_get_text(CLUTTER_TEXT(item->label)); - ClutterColor lcolor; - clutter_text_get_color(CLUTTER_TEXT(item->label), &lcolor); + ClutterColor lcolor = {0, 0, 0, 255}; ClutterActor *lbl = clutter_text_new_full(FOLDER_LARGE_FONT, ltext, &lcolor); clutter_container_add_actor(CLUTTER_CONTAINER(folder), lbl); clutter_actor_set_position(lbl, 16.0, 8.0); + clutter_actor_set_width(lbl, (gfloat)(STAGE_WIDTH)-32.0); + clutter_actor_raise(lbl, trect); + clutter_actor_grab_key_focus(lbl); clutter_text_set_editable(CLUTTER_TEXT(lbl), TRUE); clutter_text_set_selectable(CLUTTER_TEXT(lbl), TRUE); clutter_text_set_single_line_mode(CLUTTER_TEXT(lbl), TRUE); |