kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

Context Buttons should show as "pressed in" when clicked #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an element
2. Mouse down on the Undo button

What is the expected output? What do you see instead?
The Undo button does not 'press in'.  We should have some UI code change
the styling of the buttons to give the effect of a pressed-in button (use
same styling as the current tool on the left toolbar).

Original issue reported on code.google.com by codedr...@gmail.com on 5 Sep 2009 at 8:02

GoogleCodeExporter commented 9 years ago
Actually, in 2.2 we had this effect.  Something must have broken in 2.3.  We 
need to
restore that behavior in 2.4.

Original comment by codedr...@gmail.com on 5 Sep 2009 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 23 Sep 2009 at 6:14

GoogleCodeExporter commented 9 years ago
This was broken at r406.

I have, I think, restored a similar behavior using only CSS. I don't know if 
it's
alright to just replace many lines of Javascript with a few lines of CSS, but it
should change the buttons background when they are enabled and hovered.
It also applies to the layer panel small buttons, although it should not apply 
in
theory to the Up and Down ones, but they are active even when there is only one 
layer.

While doing that, I noticed that all the left tools are disabled when No stroke 
and
No Fill is selected in the bottom toolbar, except the Polyline and the Image. It
makes sense for the Image tool, but I'm not sure for the Polyline one?

Attaching what I think is a diff to svg-editor.css 

Original comment by worms_...@yahoo.com on 13 Oct 2009 at 10:19

Attachments:

GoogleCodeExporter commented 9 years ago
Hi wormsxulla,

Thanks for this patch.  Unfortunately it doesn't do what I was after.  If you
mousedown on the Undo button it should show as if pressed in.  You can see this
effect if you mousedown on a layer button like "New Layer".  The borders switch 
from
light-to-dark.  This can only be achieved with some JavaScript handlers on
mousedown/mouseup/mouseout events, I think.

The hover effect is kind of nice to indicate it's a button that's pressable, 
and we
can keep it but I think it shouldn't show so dark.  Maybe we can adjust the
background colour slightly in your patch.

You're right, that polyline thing doesn't seem to make much sense.

Original comment by codedr...@gmail.com on 13 Oct 2009 at 12:31

GoogleCodeExporter commented 9 years ago
Btw, thanks for hunting down the rev number in which this broke.  Maybe someone 
can
figure out why adaveria's code doesn't do what my earlier code did.

Original comment by codedr...@gmail.com on 13 Oct 2009 at 12:39

GoogleCodeExporter commented 9 years ago
No worries :-) Yes, feel free to adjust the color if the patch even makes it 
in. I
hadn't notice the difference when "pressed in".

Original comment by worms_...@yahoo.com on 13 Oct 2009 at 6:35

GoogleCodeExporter commented 9 years ago
Fixed in r833.

Original comment by codedr...@gmail.com on 15 Oct 2009 at 2:49