-
17 Dec 2009 3:19 PM #1
[FIXED] Hovering over a SplitButton shows a weird colored line
[FIXED] Hovering over a SplitButton shows a weird colored line
Hello,
I've noticed a small problem: if the Slate theme is active, hovering over a SplitButton will show a weird colored (cyan) horizontal line, but only when the SplitButton is inside a ToolBar (I think).
An example: http://www.extjs.com/examples/#basictoolbar. Hovering over the second button should show the problem.
An anti-example: http://www.extjs.com/examples/#buttons (scroll down to the SplitButton examples). Here the problem doesn't show up. The difference might be that example one has a SplitButton inside a ToolBar, while example two does not.
Searching for a reason showed me: the actual image that gets used, is s-arrow-o.gif from the default theme instead of the Slate one.
If you only use the Slate theme, a temporary workaround/quickfix is to copy <gxt-resources>/themes/slate/images/slate/button/s-arrow-o.gif to <gxt-resources>/images/default/button/s-arrow-o.gif. Now the problem will not be Slate's, but the default theme's
.
I've seen this happen in IE 7, FF 3.5, and Safari 4, all on Windows.
I'm pretty sure it has something to do with the Slate css not overriding the default css, but can't really figure out the css.
When I have more time, I'll try to figure it out. In the meantime, maybe someone already has the solution.Last edited by W1cK8; 17 Dec 2009 at 3:43 PM. Reason: Addition
-
17 Dec 2009 4:06 PM #2
I might have found something to solve this. The xtheme-slate.css file from GXT 2.1.0, line 97 states:
.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split {
background-image:url(../images/slate/button/s-arrow-o.gif);
}
There's a whole lotta style applied, but not when the button is inside a toolbar. So when changing this part to
.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split,
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split {
background-image:url(../images/slate/button/s-arrow-o.gif);
}
then it does work. The change being: take all the css qualifiers and add .x-toolbar to every part. Since I'm not really an expert on how these styles apply, I'm not sure this isn't overkill or doesn't introduce any side effects.
Last edited by W1cK8; 17 Dec 2009 at 4:13 PM. Reason: Colorize
-
20 Jan 2010 9:40 PM #3
This bug is fixed in the releases/2.1 branch and is now available in the 2.1.1-beta release available here.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote