Closed
Bug 90314
Opened 23 years ago
Closed 23 years ago
Create <spinbuttons/> widget
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.3
People
(Reporter: hwaara, Assigned: hwaara)
References
()
Details
(Whiteboard: approved for 0.9.3)
Attachments
(9 files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
image/jpeg
|
Details | |
(deleted),
image/png
|
Details | |
(deleted),
image/png
|
Details | |
(deleted),
image/gif
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
In order for bug 90289 to get fixed, we need a <sprinbuttons/> widget (so we can
be 4xp).
A spinbutton is a simple widget, that exists on all operating systems I know of.
It's two arrows - one pointing up and one down.
[A]
[V]
My idea is this: if you click the up arrow, an onUp() event is fired. If down,
the onDown() event is triggered.
Assignee | ||
Comment 1•23 years ago
|
||
Trying to fix this, but still reading up on XBL.
Comment 2•23 years ago
|
||
I want to be the r or sr on this bug when you have a patch ready.
Assignee | ||
Comment 3•23 years ago
|
||
I will give the choice to have this either horizontally or vertically:
[<][>] OR [A]
[V]
Currently, I will use the down/up arrows from scrollbars the themes. However, I
would appreciate if the theme owners could make arrows for their themes that
would look better (if this solution proves to look bad). Hewitt, Marlon and
Andreww?
Reassign to myself
Assignee: trudelle → hwaara
Comment 4•23 years ago
|
||
i suggest using a regular widget button with a black arrow centered. i believe
these arrows exist in back and forward buttons for various dialogs
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
Assignee | ||
Comment 7•23 years ago
|
||
Ok, here is the first draft of the implementation. I used a simple XUL testcase
with just <window><spinbuttons/></window> in it to try it.
The console prints that it rendered successfully, not sure why it not visible
though.
For now, I will use the scrollbar's arrows but I hope to have something better
in modern3 later. I'm no good with photoshop... Please take a look at the patch.
seems like you aught to msg marlon about getting new widget icons for
them.
Assignee | ||
Comment 9•23 years ago
|
||
Would be great if someone could look at the patch and tell me why it's not
displaying. :)
Assignee | ||
Comment 10•23 years ago
|
||
Yahoo, got it partly working now. Now to struggle with events and inheritance...
Assignee | ||
Comment 11•23 years ago
|
||
With some blood, sweat, hacking and help from the npm.xml people I am making
good progress on this one.
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•23 years ago
|
||
Comment 13•23 years ago
|
||
I apologize for being behind on my bugmail, but ... I can't think of a single
case where you'd ever need orient="horizontal".
Comment 14•23 years ago
|
||
oh! i know, let's design our entire toolkit around what MPT can or cannot come
up with in his brain ;)
Comment 15•23 years ago
|
||
Assignee | ||
Comment 16•23 years ago
|
||
Marlong: Good idea. However, I believe that's another widget.
I removed support for orient (this made stuff a lot more simple). I may
reimplement it some day if anyone needs it then.
I am 90% done with this patch... there's still one problem: I still need theme
images for this widget. It's simple: two buttons with arrows on them.
I tried with the arrows we already had -- it didn't look good. Marlon, is it
possible you could make up something quick (just uparrow-button,
downarrow-button and both depressed) for modern?
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
please use a widget button, and place these arrows inside for normal and active
states
Assignee | ||
Comment 19•23 years ago
|
||
Thanks Marlon! I will try and make something useful out of it.
Assignee | ||
Comment 20•23 years ago
|
||
Marlon, you don't mean that I should use *one* button though? Since it's up and
down... (just making sure.)
Comment 21•23 years ago
|
||
no i just meant you could cut them out and use them how you need.
Assignee | ||
Comment 22•23 years ago
|
||
Ok, I composed modern3 buttons for this by hand in photoshop (a real PITA --
took 3 hours!). I had to take the button parts and put it together by hand to
make it as small as possible.
Anyway, got it working nicely now.
Do I really have go through this pain for Classic too or is there a shortcut?
Assignee | ||
Comment 23•23 years ago
|
||
Yay! The images for all themes (win classic and mac classic uses the same) are
done and the xbl is done!
The events' names are: onup() and ondown() (since there is only a vertical
orient anyway now.)
The syntax is easy: <spinbuttons ondown="decreaseSomeValue()"/>
Coming up: screenshot of classic and modern <spinbuttons/>, and patch for review.
Assignee | ||
Comment 24•23 years ago
|
||
Assignee | ||
Comment 25•23 years ago
|
||
Assignee | ||
Comment 26•23 years ago
|
||
I need permission from hewitt, I suppose, to create the directory "spinbuttons"
in themes/modern/global in CVS. In that dir resides all the modern images for
<spinbuttons/>.
Because I couldn't add the dir (w/o permission), I decided to not include images
in my patch.
Hewitt?
Comment 27•23 years ago
|
||
Little nits: spinbtn-up-act.gif should be spinbutton-up-active.gif (same for
the rest of the images)
Either way, r=aegis
Of course, take my r= with a grain of salt, since I'm by not an XBL guru. But I
didn't see any glaring problems. :)
Assignee | ||
Comment 28•23 years ago
|
||
I'm not sure the names should be that way. I'm using the same naming convention
as most images under the themes/ directory.
Assignee | ||
Comment 29•23 years ago
|
||
Hewitt gave me a couple of suggestions and comments. I will post a cleaner and
better patch incorporating his feedback soon.
Assignee | ||
Comment 30•23 years ago
|
||
Assignee | ||
Comment 31•23 years ago
|
||
Ok, incorporated feedback from hewitt and added the dir to CVS.
The latest patch is a full one, so all images are cvs added to...
Can I get a sr=hyatt (and maybe r=hewitt as bonus)?
Assignee | ||
Comment 32•23 years ago
|
||
Ouch, the last one was horked (events horked, visibility horked) due to a minor
problem in my xml. Sorry about that.
Let me attach a fix that works perfectly.
Assignee | ||
Comment 33•23 years ago
|
||
Comment 34•23 years ago
|
||
BTW, on Windows, there is a font (Marlett) that has the glyphs you should use for
the arrows. That makes sure that they are anti-aliased and look good at all sizes.
Comment 35•23 years ago
|
||
Does everybody have this font? I don't see it on my system.
Assignee | ||
Comment 36•23 years ago
|
||
Well, the fonts thing is not gonna happen anyway. Besides, if you really want it
to happen (for all other widgets with arrows), it's Another Bug. :)
Requesting sr= from hyatt...
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.3
Assignee | ||
Comment 37•23 years ago
|
||
Hyatt? Bueller, bueller... I want this in for 0.9.3
Comment 38•23 years ago
|
||
*** Bug 92311 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
Comment 39•23 years ago
|
||
How does this relate to hewitt's new widgets? I'm not sure I see the need for a
<spinbuttons> widget by itself (i.e., it seems like this would only ever be used
as part of a textbox/spinbutton widget, and that widget could just have the
buttons defined in its XBL.
Assignee | ||
Comment 40•23 years ago
|
||
I can see many possible usages of this widget, when grouped together with a
popupmenu (click up to go up in the menu...) or with a textbox.
Do you want me to make two widgets on top of this that groups <spinbuttons/>
together with a popupmenu and a textbox or what?
Comment 41•23 years ago
|
||
sr=hyatt
Comment 42•23 years ago
|
||
a=dbaron on behalf of drivers for trunk checkin during 0.9.3 closure
Whiteboard: approved for 0.9.3
Assignee | ||
Comment 43•23 years ago
|
||
fix checked in. who-hoo!
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 44•23 years ago
|
||
May God have mercy on us all. The 212 bug spam-o-rama is Now!
QA Contact: aegis → jrgm
You need to log in
before you can comment on or make changes to this bug.
Description
•