[gegl] gcut: adjust part mode to use 2/3rds of screen
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gcut: adjust part mode to use 2/3rds of screen
- Date: Mon, 17 Jul 2017 19:10:04 +0000 (UTC)
commit a85bd56a5786ab5655615b9a3165c8cb9051825f
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jul 17 20:23:08 2017 +0200
gcut: adjust part mode to use 2/3rds of screen
gcut/gcut-ui.c | 38 +++++++++++++++++++++++++++-----------
gcut/gcut.h | 2 +-
2 files changed, 28 insertions(+), 12 deletions(-)
---
diff --git a/gcut/gcut-ui.c b/gcut/gcut-ui.c
index 04e3520..9e3ab58 100644
--- a/gcut/gcut-ui.c
+++ b/gcut/gcut-ui.c
@@ -1927,9 +1927,30 @@ static float print_props (Mrg *mrg, GeglEDL *edl, GeglNode *node, float x, float
g_free (val);
str= g_strdup ("");
}
+ else if (g_type_is_a (type, G_TYPE_STRING))
+ {
+ char *val = NULL;
+ gegl_node_get (node, props[i]->name, &val, NULL);
+ mrg_printf (mrg, "%s: \"", props[i]->name);
+ if (snode && !strcmp (props[i]->name, sprop))
+ {
+ mrg_edit_start (mrg, update_string, edl);
+ }
+ else
+ mrg_text_listen (mrg, MRG_CLICK, edit_string, node, (void*)g_intern_string(props[i]->name));
+ mrg_printf (mrg, "%s", val);
+
+ if (snode && !strcmp (props[i]->name, sprop))
+ mrg_edit_end (mrg);
+ else
+ mrg_text_listen_done (mrg);
+ mrg_printf (mrg, "\"");
+ g_free (val);
+ str= g_strdup ("");
+ }
else
{
- str = g_strdup_printf ("%s: [todo: handle this property type]", props[i]->name);
+ str = g_strdup_printf ("%s: [unhandled]", props[i]->name);
mrg_printf (mrg, "%s", str);
}
@@ -2101,7 +2122,7 @@ static float print_nodes (Mrg *mrg, GeglEDL *edl, GeglNode *node, float x, float
{
if (node == selected_node)
y = print_props (mrg, edl, node, x + mrg_em(mrg) * 0.5, y);
-#if 0
+#if 1
rounded_rectangle (mrg_cr (mrg), x-0.5*mrg_em(mrg), y - mrg_em (mrg) * 1.0, mrg_em(mrg) * 10.0,
mrg_em (mrg) * 1.2, 0.4, -1);
cairo_rectangle (mrg_cr (mrg), x + 1.0 * mrg_em (mrg), y - mrg_em (mrg) * 1.4, mrg_em(mrg) * 0.1,
mrg_em (mrg) * 0.4);
@@ -2878,8 +2899,8 @@ void gcut_ui (Mrg *mrg, void *data)
,edl);
break;
case GEDL_UI_MODE_PART:
- mrg_gegl_blit (mrg, (int)(mrg_width (mrg) * 0.2), 0,
- (int)(mrg_width (mrg) * 0.8),
+ mrg_gegl_blit (mrg, (int)(mrg_em(mrg) * 22), 0,
+ (int)-1,
mrg_height (mrg) * SPLIT_VER,
o->edl->cached_result,
0, 0,
@@ -2888,18 +2909,13 @@ void gcut_ui (Mrg *mrg, void *data)
break;
}
-
switch (edl->ui_mode)
{
case GEDL_UI_MODE_FULL:
case GEDL_UI_MODE_TIMELINE:
case GEDL_UI_MODE_PART:
- gcut_draw (mrg, edl, 0, mrg_height (mrg) * SPLIT_VER, edl->scale, edl->t0);
-
-
-
-
- break;
+ gcut_draw (mrg, edl, 0, mrg_height (mrg) * SPLIT_VER, edl->scale, edl->t0);
+ break;
case GEDL_UI_MODE_NONE:
break;
break;
diff --git a/gcut/gcut.h b/gcut/gcut.h
index a4fe599..a57f872 100644
--- a/gcut/gcut.h
+++ b/gcut/gcut.h
@@ -139,7 +139,7 @@ void gegl_meta_set_audio (const char *path,
void gegl_meta_get_audio (const char *path,
GeglAudioFragment *audio);
-#define SPLIT_VER 0.8
+#define SPLIT_VER 0.666
extern char *gcut_binary_path;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]