123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- Menubar.View = function ( editor ) {
- var container = new UI.Panel();
- container.setClass( 'menu' );
- var title = new UI.Panel();
- title.setTextContent( 'View' );
- title.setMargin( '0px' );
- title.setPadding( '8px' );
- container.add( title );
- //
- var options = new UI.Panel();
- options.setClass( 'options' );
- container.add( options );
- // themes
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Light theme' );
- option.onClick( function () {
- editor.setTheme( 'css/light.css' );
- editor.config.setKey( 'theme', 'css/light.css' );
- } );
- options.add( option );
- // about
- var option = new UI.Panel();
- option.setClass( 'option' );
- option.setTextContent( 'Dark theme' );
- option.onClick( function () {
- editor.setTheme( 'css/dark.css' );
- editor.config.setKey( 'theme', 'css/dark.css' );
- } );
- options.add( option );
- //
- return container;
- }
|