different layout of MavinSketch applet on Mac and PC

User 941c2467a3

13-11-2008 21:32:33

Dear Chemaxon,





I set the size of MavinSketch applet to 450x440.


It looks OK on PC but not on Mac. On Mac the cell space is larger, and all buttons can't be shown.





Here is two screen shots taken of MarvinSketch,


using the same web browser, Firefox 3.0.3, on windows XP and MacOS 10.5.5.





Could you give me a hint on solving this problem? Thanks much!





Best regards,


Jeff Gao

ChemAxon 7c2d26e5cf

14-11-2008 07:41:35

The layout is different because the default Look&Feel are different on the two operating system. Windows uses "Metal", meanwhile OS X prefers "Aqua". The "Aqua" L&F is a Mac specific layout. The "Metal" L&F is a cross-platform solution.


To unify your applet layout, define the L&F of the applet with the skin applet parameter.


Code:
msketch_begin("/marvin",450,400);


msketch_param("skin","javax.swing.plaf.metal.MetalLookAndFeel");


msketch_end();

ChemAxon 909aee4527

14-11-2008 11:46:33

Dear Jeff Gao,





from the screenshot it seems that you use Marvin 5.0.0 version.


Another hint that if you upgrade to a newer version, a Toolbar drop-down list box will make all buttons available regardless of the look and feel being used, see the attached screenshot. The feature was added in Marvin 5.0.1.





Kind regards,


Judit

User 941c2467a3

14-11-2008 21:16:35

Tamas wrote:
The layout is different because the default Look&Feel are different on the two operating system. Windows uses "Metal", meanwhile OS X prefers "Aqua". The "Aqua" L&F is a Mac specific layout. The "Metal" L&F is a cross-platform solution.


To unify your applet layout, define the L&F of the applet with the skin applet parameter.


Code:
msketch_begin("/marvin",450,400);


msketch_param("skin","javax.swing.plaf.metal.MetalLookAndFeel");


msketch_end();
Thanks. This really helps!





Regards,


Jeff

User 941c2467a3

14-11-2008 21:17:07

Judit wrote:
Dear Jeff Gao,





from the screenshot it seems that you use Marvin 5.0.0 version.


Another hint that if you upgrade to a newer version, a Toolbar drop-down list box will make all buttons available regardless of the look and feel being used, see the attached screenshot. The feature was added in Marvin 5.0.1.





Kind regards,


Judit
This is really a nice feature! Thanks again!





Regards,


Jeff Gao