diff --git a/gui.c b/gui.c index 75e6774..119c524 100644 --- a/gui.c +++ b/gui.c @@ -498,10 +498,8 @@ static void edit_frame(struct frame *frame) static void select_frame(struct frame *frame) { - if (active_frame) { + if (active_frame) label_in_box_bg(active_frame->label, COLOR_FRAME_UNSELECTED); - inst_deselect(); - } active_frame = frame; change_world(); } @@ -648,6 +646,7 @@ static void make_center_area(GtkWidget *vbox) void change_world(void) { + inst_deselect(); status_begin_reporting(); instantiate(); label_in_box_bg(active_frame->label, COLOR_FRAME_SELECTED); diff --git a/gui_inst.c b/gui_inst.c index a14b608..41c7e02 100644 --- a/gui_inst.c +++ b/gui_inst.c @@ -257,7 +257,7 @@ void gui_draw_pad(struct inst *self, struct draw_ctx *ctx) c = add_vec(min, max); h = min.y-max.y; w = max.x-min.x; - render_text(DA, gc, c.x/2, c.y/2, w <= h ? 0 : 90, self->u.name, + render_text(DA, gc, c.x/2, c.y/2, w <= h*1.1 ? 0 : 90, self->u.name, PAD_FONT, 0.5, 0.5, w-2*PAD_BORDER, h-2*PAD_BORDER); }