neo-blessed/test/widget-shrink-padding.js

44 lines
620 B
JavaScript
Raw Normal View History

2013-07-18 22:56:05 +00:00
var blessed = require('../')
2013-07-28 19:29:07 +00:00
, screen;
screen = blessed.screen({
2015-07-22 02:23:57 +00:00
dump: __dirname + '/logs/shrink-padding.log',
warnings: true
2013-07-28 19:29:07 +00:00
});
2013-07-17 15:29:42 +00:00
var outer = blessed.box({
parent: screen,
//left: 0,
//top: 0,
//left: '50%',
//top: '50%',
left: 'center',
top: 'center',
padding: 1,
shrink: true,
2015-04-04 06:43:24 +00:00
style: {
bg: 'green'
}
2013-07-17 15:29:42 +00:00
});
var inner = blessed.box({
parent: outer,
left: 0,
top: 0,
//width: 5,
//height: 5,
shrink: true,
content: 'foobar',
2013-07-17 15:29:42 +00:00
//padding: 1,
//content: 'f',
2015-04-04 06:43:24 +00:00
style: {
bg: 'magenta'
}
2013-07-17 15:29:42 +00:00
});
screen.key('q', function() {
return process.exit(0);
});
screen.render();