I just created it right aligned using pure css (didn't test it in IE, but right now I don't care about it). You just need to extend DataGrid.Resources and inject your style into your app:
@sprite .dataGridSortableHeader:after {
gwt-image: "isSortable";
content: "";
display: inline-block;
margin-left: 5px;
}
.dataGridSortedHeaderAscending > div, .dataGridSortedHeaderDescending > div {
display: inline-block;
padding-left: 0 !important;
padding-right: 16px;
}
.dataGridSortedHeaderAscending img, .dataGridSortedHeaderDescending img {
display: none;
}
.dataGridSortedHeaderAscending:after, .dataGridSortedHeaderDescending:after {
display: none;
}
@sprite .dataGridSortedHeaderAscending > div:after {
gwt-image: "ascending";
position: absolute;
right: 0;
top: 50%;
margin-top: -3px;
content: "";
}
@sprite .dataGridSortedHeaderDescending > div:after {
gwt-image: "descending";
position: absolute;
right: 0;
top: 50%;
margin-top: -3px;
content: "";
}
works like a charm. you just need to correct margins if dimensions vary from my image.
-- @sprite .dataGridSortableHeader:after {
gwt-image: "isSortable";
content: "";
display: inline-block;
margin-left: 5px;
}
.dataGridSortedHeaderAscending > div, .dataGridSortedHeaderDescending > div {
display: inline-block;
padding-left: 0 !important;
padding-right: 16px;
}
.dataGridSortedHeaderAscending img, .dataGridSortedHeaderDescending img {
display: none;
}
.dataGridSortedHeaderAscending:after, .dataGridSortedHeaderDescending:after {
display: none;
}
@sprite .dataGridSortedHeaderAscending > div:after {
gwt-image: "ascending";
position: absolute;
right: 0;
top: 50%;
margin-top: -3px;
content: "";
}
@sprite .dataGridSortedHeaderDescending > div:after {
gwt-image: "descending";
position: absolute;
right: 0;
top: 50%;
margin-top: -3px;
content: "";
}
works like a charm. you just need to correct margins if dimensions vary from my image.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment