Just thought i should share 3 of my controls. This forum is so helpful, time to give something back.
Switch (Horizontal/Vertical) Canvas Custom Control; Not using any picture, real-time drawn.
Color Selector (2 own Palette (Theme and 48) and SelectColor integration) Canvas Custom Control; Using one icon/picture for the ‘More color’ section, real-time drawn.
Font Selector (Optional Preview of the Fonttype) Based on PopupMenu.
You can use it for free, just name ‘cmd IT-Services’ somewhere in the credits.
My benefit should be feedback and bug reports, that’s why i keep the source encrypted.
Switch and Color Picker are Retina ready (Text) and can be used in any size as they are 100% drawn without any picture, the example code enables Retina for OS X.
[quote=184413:@Albin Kiland]Sweet. Thanks for sharing
Are you sure the switch is retina ready though?
[/quote]
The Text is, as all the controls don’t use any OS specific declares, the painting is done with pure XOJO functions.
This means for the moment, that only the Text can be drawn in Retina resolution, the other drawing and picture functions have to wait for the XOJO update …
I didn’t found a way without temporary storing the created image as a file with proper naming for retina, as i don’t want temp files i decided not todo so. Happy to hear about other approaches and also happy to add any idea with credit notes.
yes sorry, forgot to enable the scaling in the first upload, pitty this dosn’t work/help for text on picture objects … let me know when you find bugs/wrong behavior, thx
Looks nice on OSX. However the are some problems on Windows. On my windows PC, it takes about 8 seconds to load the demo form and the graphics seem to be a bit screwed up (like the white background in each control).
[quote=184648:@Alain Bailleul]Looks nice on OSX. However the are some problems on Windows. On my windows PC, it takes about 8 seconds to load the demo form and the graphics seem to be a bit screwed up (like the white background in each control).
[/quote]
Alain,
which Win Version and which XOJO Version are you using? GDI+ is on?
Thank you all for your Feedback, uploaded a new version, as i don’t have Win available (OS X and Linux only) i would appreciate if you guys can download the new version and check. I found a bug and hopefully all reason’s for the ‘screwed up’ look. Thanks in advance for your help.
Btw, the Font Selector need’s to be moved from Superclass PopupMenu to a Canvas based like the Color Selector, i need it now on Linux as well and the PopupMenu doesn’t support what i need. In the meanwhile i had to switch to a BevelButton as a carrier.
Will upload tonight a new version, as you can see in the upper most screenshot i got the chance to have a win box for a day to tweak the graphics. Was a huge surprise for me how big the differences are. Still no declares but some Target conditions. Big learning: GDI+ integration is very bad, had to switch it off most of the times. Wonder if the integration is correct if you need to tweak on pixel level.
Without a box for each OS it’s nearly impossible, wonder what your experience is…