mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-12-23 04:43:21 +02:00
- before changing the world, always deselect (reported by Dave Ball)
- gui_draw_pad: add 10% of slack so that pad names are upright unless we really need to rotate git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5380 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
96d41a37ab
commit
0ff7a6a3ab
5
gui.c
5
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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user