Bug 311 - [chameleon 1.99] TextButton shared resource: borders enhancement
: [chameleon 1.99] TextButton shared resource: borders enhancement
Status: NEW
: Chameleon
Widget
: 1.99
: PC Windows 2000
: P5 enhancement
: FUTURE
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-03-18 11:42 by
Modified: 2004-08-10 16:03 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-03-18 11:42:31
Is there a way to simply ask for a border of a certain colour and thickness in
the TextButton shared resource? I can easily set the background colour of a
button, but if I want a simple outline I need to specify 9 different border
images. I also have to create an image to use for each. In the case of a simple
outline I only need one image, but still, this seems unecessarily complicated
for such a simple objective.

I think that in addition to being able to specify border images we should be
able to simply specify a border colour and thickness.

One of the main goals of the buttonizer is to free people from having to
pregenerate graphics, no? Using the TextButton resource still relies pretty
heavily on pregenerated images if that's the only way to get button borders.
------- Comment #1 From 2004-04-01 15:15:55 -------
the buttonizer doesn't provide this capability.  It would be possible to extend
it to do this, but we would be stretching the original design quite a bit I think.

I guess the idea was that it would be easier to pregenerate a few border
graphics that never have to change than to generate full buttons that you would
have to keep changing to adjust colors and sizes etc.

Fred has more ideas for the buttonizer, perhaps we should do that soon?
------- Comment #2 From 2004-04-01 15:36:36 -------
I guess what I'm getting at is that it would be nice to be able to create simple
buttons without having to provide graphics at all. If I'm a graphically
challenged  developer and just want some text buttons I'd want to be able to
just supply the text label and go. The idea of providing 8 graphics (or
specifying one graphic 8 times) seems a little more complex than it should be
just to get an outline. If all I want to do is change a border colour I have to
have a graphics package etc... 

The capability to specify border graphics is great, especially if you want to
get fancy, but it just seems excessively technical for the simple job of adding
a border.

That's just my opinion. Take it or leave it. 
------- Comment #3 From 2004-04-01 18:27:49 -------
After discussing this with dean over MSN...

1) Be able to shortcircuit buttonizer by specifying an image and no button
resource... it's not clear right now that you can do that.

Technically we can already do that, but I need to make a full clean set of basic
buttons so you can do it out of the box.  I would use the basic set of button
resources to achieve this.

2) Need ability to just specify width, style and colour for borders

This, as paul says is no small thing.  It means a complete redesign of the
button resource.  I think we should model this completely on the way CSS works.
 with CSS you can specify width, style and colour, and the coolest thing about
CSS syntax is the shorthand.

border: #ffffff, 1px, solid;

is also

border-color: #ffffff;
border-width: 1px;
border-style: solid;

is also

top-border-color: #ffffff;
top-border-width: 1px;
top-border-style: solid;
etc... for left bottom and right

of course to suport the images, border-image is also needed

Note: other parameters would need to be shortened or changed to reflect this
methodology.  

background-image
background-color

icon-src
icon-width
icon-height

label-value
label-font
label-color
label-size

I think also that something deeds to be done about padding and nudge, like
depricate and replace with position properties

icon-horizontal-position (could be left right center, or px value)
icon-vertical-position

label-horizontal-position
label-vertical-position

if we keep nudge and padding they should be

icon-padding
label-padding

or

icon-top-padding etc...

The other thing that needs to be considered is defaut values so that buttons can
be made without specifying all these parameters.
------- Comment #4 From 2004-04-01 21:14:30 -------
regarding comment #1, it should work right now to specify an image in the widget
tag but no styleresource, in which case the image will be displayed as is (no
buttonizer).  Obviously adding a label attribute will have no effect if you do
this.  You will still need to provide an imagewidth and imageheight though.

regarding comment #2, I may have a way of doing what Dean wants ... without the
full redesign discussed by Fred.  I'll have to think about it and talk it over
with Dean.  
------- Comment #5 From 2004-04-05 15:15:05 -------
will be addressed post 1.99
------- Comment #6 From 2004-04-08 08:35:34 -------
updated version to 1.99
------- Comment #7 From 2004-07-08 11:05:43 -------
Changed target to 2.1.
------- Comment #8 From 2004-08-10 16:03:20 -------
Changed Target Milestone to FUTURE. (Enhancements may be moved from this target 
to specific "versioned" targets after product design review cycles.)