[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gschem "handles" are tied to schematic size, not screen size



On Thu, Jun 11, 2009 at 1:00 AM, Mark Rages<markrages@xxxxxxxxx> wrote:
> I see that this might be an annoyance with my patch.  I solved it by
> editing my $GEDA/share/gEDA/gschem-colormap-darkbg:
>
> -   (net-endpoint       "#ff0000")
> +  (net-endpoint       "#ff0000a0")
>
> A bit hacky, but works OK in practice.  I think it's better to not
> mess with the cue size, because it affords a visual reference to how
> "zoomed-in" you are.
>
> Obligatory screenshot: http://vivara.net/images/gschem_cue_grip.png
>

This patch also fixes it in a less-hacky way (no alpha required).  It
simply draws grips back over the cue dots so they don't become
obscured.

Regards,
Mark
markrages@gmail
-- 
Mark Rages, Engineer
Midwest Telecine LLC
markrages@xxxxxxxxxxxxxxxxxxx
diff --git a/gschem/include/gschem_defines.h b/gschem/include/gschem_defines.h
index cd34528..a849436 100644
--- a/gschem/include/gschem_defines.h
+++ b/gschem/include/gschem_defines.h
@@ -31,6 +31,7 @@
 #define GRIP_SIZE3		80
 #define SMALL_ZOOMFACTOR1	150
 #define SMALL_ZOOMFACTOR2	30
+#define MAXIMUM_GRIP_PIXELS     30
 
 /* for bus_ripper_type */
 #define COMP_BUS_RIPPER         0
diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index f5daa76..e465539 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -56,6 +56,10 @@ void o_cue_redraw_all (GSCHEM_TOPLEVEL *w_current, GList *list, gboolean draw_se
 	  w_current->toplevel->DONT_REDRAW = 0 || redraw_state;
 	}
         o_cue_draw_single(w_current, o_current);
+
+	if (o_current->selected && w_current->draw_grips) {
+	  o_line_draw_grips (w_current, o_current);
+	}
         break;
 
       case(OBJ_COMPLEX):
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index d6db1bb..49f0e42 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -1544,7 +1544,7 @@ void o_grips_end_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current, int whichone
  *  and height of a grip in screen units.
  *
  *  <B>GRIP_SIZE1</B> and <B>GRIP_SIZE2</B> and <B>GRIP_SIZE3</B> are macros defined
- *  in libgeda #defines.h. They are the half width/height of a grip in
+ *  in gschem_defines.h. They are the half width/height of a grip in
  *  world unit for a determined range of zoom factors.
  *
  *  \param [in] w_current  The GSCHEM_TOPLEVEL object.
@@ -1566,8 +1566,8 @@ int o_grips_size(GSCHEM_TOPLEVEL *w_current)
     /* small zoom factor : big size converted to screen unit */
     size = SCREENabs (w_current, GRIP_SIZE3);
   }
-  
-  return size;
+
+  return min(size, MAXIMUM_GRIP_PIXELS/2);
 }
 
 /*! \brief Draw grip centered at <B>x</B>, <B>y</B>

_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user