[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 Tue, Jun 9, 2009 at 8:35 PM, Peter Clifton<pcjc2@xxxxxxxxx> wrote:
> On Tue, 2009-06-09 at 20:16 -0500, Mark Rages wrote:
>>
>> If a line is selected, a square-shaped handle appears on each end.
>> However, when I zoom in these handles become bigger.  This defeats the
>> point of zooming in, because it remains extremely difficult select the
>> small lines among all the overlapping handles.
>
> I think there was some reason it wasn't done as a fixed screen size,
> although I seem to remember trying to change it to fixed size screen
> coords myself. It is somewhat defeated when you zoom way in and the grip
> is swallowed up by a huge line - but then I guess that isn't exactly
> normal use.
>
> Have a play with it yourself to see if you can find a behaviour which
> suits you.
>

OK, here's my patch, which just sets a hard limit on the screen size
of the grips.

Before: http://vivara.net/images/huge_grips.png
After: http://vivara.net/images/smaller_grips.png

This small change is a big usability improvement for me.

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_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