From 7916cd95a5b2f091688d1993c6ee4f48f918476e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 20 Feb 2020 23:04:19 +0100 Subject: Remove command line and attribute stuff from UI It will come back, in some form, later... --- src/display.c | 63 +---------------------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/src/display.c b/src/display.c index f4fa3c0..277709a 100644 --- a/src/display.c +++ b/src/display.c @@ -37,7 +37,6 @@ #include "crossfade.h" #define OVERALL_BORDER (20.0) -#define OVERALL_SPLIT (0.5) #define FIXTURE_BORDER (5.0) int key_attrs[] = { @@ -155,12 +154,10 @@ static const char *attr_text(int cls) static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct lightctx *nl) { int w, h; - int ch; int i; PangoContext *pc; PangoFontDescription *fontdesc; double x, y; - PangoRectangle cursor; w = gtk_widget_get_allocated_width(widget); h = gtk_widget_get_allocated_height(widget); @@ -175,14 +172,6 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct lightctx *nl) w -= OVERALL_BORDER*2.0; h -= OVERALL_BORDER*2.0; - /* Separator between fixture and cue areas */ - cairo_move_to(cr, w*OVERALL_SPLIT, 0.0); - cairo_line_to(cr, w*OVERALL_SPLIT, h - 50.0); - cairo_set_line_width(cr, 3.0); - cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); - cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); - cairo_stroke(cr); - /* Fixtures */ x = FIXTURE_BORDER; y = FIXTURE_BORDER; @@ -194,62 +183,12 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct lightctx *nl) draw_fixture(cr, pc, fontdesc, nl, &nl->fixtures[i]); cairo_restore(cr); x += nl->fixture_width + FIXTURE_BORDER*2; - if ( x + nl->fixture_width + FIXTURE_BORDER*2 > w*OVERALL_SPLIT ) { + if ( x + nl->fixture_width + FIXTURE_BORDER*2 > w ) { x = FIXTURE_BORDER; y += nl->fixture_width*3.0/2.0 + FIXTURE_BORDER*2; } } - /* Command line */ - pango_layout_set_text(nl->layout, nl->cmdline, -1); - cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); - cairo_save(cr); - cairo_translate(cr, 0.0, h - 50.0); - cairo_move_to(cr, 0.0, 0.0); - pango_cairo_show_layout(cr, nl->layout); - pango_layout_get_cursor_pos(nl->layout, nl->cursor_idx, &cursor, NULL); - x = pango_units_to_double(cursor.x); - y = pango_units_to_double(cursor.y); - ch = pango_units_to_double(cursor.height); - cairo_move_to(cr, x, y); - cairo_line_to(cr, x, y+ch); - cairo_set_line_width(cr, 3.0); - cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); - cairo_set_source_rgb(cr, 0.8, 0.4, 0.4); - cairo_stroke(cr); - cairo_restore(cr); - - /* Selected attribute indicator */ - for ( i=0; i<12; i++ ) { - - if ( !any_selected_fixture_has(nl, key_attrs[i+1]) ) continue; - - if ( nl->sel_attr == key_attrs[i+1] ) { - cairo_rectangle(cr, (w/12.0)*i, h-25.0, w/12.0, 30.0); - cairo_set_line_width(cr, 3.0); - cairo_set_source_rgb(cr, 0.2, 0.2, 0.2); - cairo_fill(cr); - } - pango_layout_set_text(nl->sa_layout, attr_text(key_attrs[i+1]), -1); - cairo_set_source_rgb(cr, 1.0, 0.0, 0.0); - pango_layout_set_width(nl->sa_layout, pango_units_from_double(w/12.0)); - cairo_move_to(cr, (w/12.0)*i, h-20.0); - pango_cairo_show_layout(cr, nl->sa_layout); - - } - - /* Separator between F4 and F5 */ - cairo_move_to(cr, w/3.0, h); - cairo_line_to(cr, w/3.0, h-20.0); - cairo_set_line_width(cr, 3.0); - cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); - cairo_stroke(cr); - - /* ... and between F8 and F9 */ - cairo_move_to(cr, 2.0*w/3.0, h); - cairo_line_to(cr, 2.0*w/3.0, h-20.0); - cairo_stroke(cr); - cairo_restore(cr); return FALSE; -- cgit v1.2.3