Hi, I am adding the on-off widget (widget.newSwitch). The default widget color is in green and I want to change it to light blue. I think I should using the sheet parameters and add a sheet image. However, I am not sure the specs needed for the sheet image. I tried to check the sample source code from corona sdk but I can not see the default image sheet used by the widget. Where can I find the default image sheet for widget so that I just need to modify the image file?
If you look at: https://github.com/coronalabs/framework-widget
You will see files like:
widget_theme_ios7.luaResizable PickerWheel core code and updates.2 years agowidget_theme_ios7.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7@2x.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7@4x.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7_sheet.lua
[Fixed end caps on iOS7 slider theme (removed virtually unnoticeable "…](https://github.com/coronalabs/framework-widget/commit/1a847b5ccb6cff8da5e6d61ff4cb506241f47870 “Fixed end caps on iOS7 slider theme (removed virtually unnoticeable “curve” and made them squared off, because the previous frame was causing a tiny seam between the frames on larger devices like Retina iPad).”)
These are the files that are part of the widget theme for iOS. The ones just labeled iOS are the old style iOS 6 and earlier and are generally not used. There are several Android-based theme files there. Look in those files. If you’re just changing the colors, you should be able to just update the PNG files.
You will likely have to use a local copy of the widget library to use your changes. The skinning for individual widgets wouldn’t use these files at all, but your own custom ones.
Rob
If you look at: https://github.com/coronalabs/framework-widget
You will see files like:
widget_theme_ios7.luaResizable PickerWheel core code and updates.2 years agowidget_theme_ios7.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7@2x.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7@4x.pngResizable PickerWheel core code and updates.2 years agowidget_theme_ios7_sheet.lua
[Fixed end caps on iOS7 slider theme (removed virtually unnoticeable "…](https://github.com/coronalabs/framework-widget/commit/1a847b5ccb6cff8da5e6d61ff4cb506241f47870 “Fixed end caps on iOS7 slider theme (removed virtually unnoticeable “curve” and made them squared off, because the previous frame was causing a tiny seam between the frames on larger devices like Retina iPad).”)
These are the files that are part of the widget theme for iOS. The ones just labeled iOS are the old style iOS 6 and earlier and are generally not used. There are several Android-based theme files there. Look in those files. If you’re just changing the colors, you should be able to just update the PNG files.
You will likely have to use a local copy of the widget library to use your changes. The skinning for individual widgets wouldn’t use these files at all, but your own custom ones.
Rob