PDA

View Full Version : [FNR] CSS missing bg.gif



support_csd_kz
25 Aug 2010, 7:53 PM
GXT version: 2.2 (build 2199)


Gray and Slate CSS missing bg.gif.
Test case:



public class Empty implements EntryPoint {

Viewport vp;
DSMenu menuBar;
DSPortal portal;
DSTollBar toolBar;

static {
ThemeManager.register(Slate.SLATE);
}

public void onModuleLoad() {
vp = new Viewport();
vp.setLayout(new RowLayout());

menuBar = new DSMenu();
portal = new DSPortal();

toolBar = new DSTollBar();
ToggleButton item = new ToggleButton();
item.setText("connect");
item.setHeight(28);
toolBar.add(item);

item = new ToggleButton();
item.setText("add");
item.setHeight(28);
toolBar.add(item);

item = new ToggleButton();
item.setText("delete");
item.setHeight(28);
toolBar.add(item);

Menu menu = new Menu();

MenuItem item1 = new MenuItem("New");
menu.add(item1);

MenuItem item2 = new MenuItem("Open File");
menu.add(item2);

Menu sub = new Menu();
sub.add(new MenuItem("readme.txt"));
sub.add(new MenuItem("helloworld.txt"));
item2.setSubMenu(sub);

menuBar.setBorders(true);
menuBar.setStyleAttribute("borderTop", "none");
menuBar.add(new MenuBarItem("File", menu));

Menu sub2 = new Menu();
sub2.add(new MenuItem("Cut"));
sub2.add(new MenuItem("Copy"));

MenuBarItem edit = new MenuBarItem("Edit", sub2);
menuBar.add(edit);

Menu sub3 = new Menu();
sub3.add(new ThemeSelector());

MenuBarItem opt = new MenuBarItem("Options", sub3);
menuBar.add(opt);

vp.add(menuBar, new RowData(1, 30));
vp.add(portal, new RowData(1, 1));
vp.add(toolBar, new RowData(1, 30));
RootPanel.get().add(vp);
}

class DSTollBar extends ToolBar {
public DSTollBar() {
super();
// setId("dx-toolbar");
setMinButtonWidth(120);
setHeight(30);
}
}

class DSMenu extends MenuBar {
public DSMenu() {
super();
// setId("dx-toolbar");
}
}

class DSPortal extends Portal {
public DSPortal() {
super(2);
}
}


If u click on options, and select Slate or Gray Theme, u will get a errors:
for gray:


[WARN] 404 - GET /gxt/images/toolbar/bg.gif (127.0.0.1) 1411 bytes
Request headers
Host: 127.0.0.1:8888
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://127.0.0.1:8888/gxt/css/gxt-gray.css
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1411


and for slate:


[WARN] 404 - GET /gxt/themes/slate/images/toolbar/bg.gif (127.0.0.1) 1424 bytes
Request headers
Host: 127.0.0.1:8888
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://127.0.0.1:8888/gxt/themes/slate/css/xtheme-slate.css
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1424

support_csd_kz
25 Aug 2010, 8:27 PM
IMHO
It's make Slate's Menubar color same as a last active theme's.

sven
30 Aug 2010, 8:35 AM
This should be fixed in SVN as of revision 2207. Can you validate this?

support_csd_kz
31 Aug 2010, 9:55 PM
Fixed for gray theme, but for Slate error still present.

support_csd_kz
31 Aug 2010, 9:57 PM
Slate theme error not really critical, cos it not a part of GXT core I think.

sven
1 Sep 2010, 8:05 AM
I just run your testcase against latest SVN and slate theme and i dont see any 404 errors anymore.