i'm trying to define a better graphic for my widget, and i'm having a problem using a grid on a fullscreen view. I'm paginating the grid and i'm attaching to it a page indicator and a metadata display. I've set all three of them with "width: this.width" and they correctly extends to all the screen, but the page indicator and the metadata displays in a strange way. They stretch like the grid but the grey half of the button stops a lot before the end of the page, basically at the dimension of a sideviewbar. i've tryed changing the background color but it just shows over this with a transparent color.
Also if i try to resize the items to a size shorter than a sidebar size the grey halfbar correctly resizes to the dimension of the button. Is it some style to set?
Also i searched the site but couldn't find a list of styles that can be changed on the various items.
There is no straight forward way to adjust the glass/glow effect on the controls for the full screen through styles. It is possible though, by extending the original control and defining a Theme for it. Following is the sample code for page indicator.
CODEBOX
Theme.storage.add("MyIndicator", {
renderSkin: function(state, w, h, args, theme){
var ff = new Frame();
ff.width = w;
ff.height = h;
theme.applyLayer('ObjectGlow', ff);
if (state == 'focused'){
theme.applyLayer('BaseFocusGlow', ff);
}
return ff;
}
});
Theme.storage.add("MyIndicatorTextLink", {
styles: {
normal: {
hAlign: 'center',
vAlign: 'center',
paddingBottom: 1,
fontFamily: Theme.fonts.regular,
fontWeight: 'bold',
fontSize: 12,
color: '#FFFFFF'
}
}
});
var custom = {};
custom.controls = {
MyIndicator: new KONtx.Class({
ClassName: 'MyIndicator',
Extends: KONtx.control.PageIndicator
});
};
After this you can use this indicator i.e. custom.controls.MyIndicator instead of KONtx.control.PageIndicator, with the same arguments. The resulting page indicator will not have the half grayish glow image.
You could do similar stuff for buttons and other controls. You can refer the file ~/TVWidgets/Konfabulator-Latest-540/data/Overlay/Script/Framework/Themes/theme.js to get an idea of the default themes for various controls.