allow themes to set padding
This commit is contained in:
parent
3f8aa00d23
commit
329ed752db
1 changed files with 10 additions and 10 deletions
|
|
@ -104,7 +104,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$markerFront = new MarkerLayer(this.content);
|
||||
|
||||
this.$cursorLayer = new CursorLayer(this.content);
|
||||
this.$cursorPadding = 8;
|
||||
|
||||
// Indicates whether the horizontal scrollbar is visible
|
||||
this.$horizScroll = false;
|
||||
|
|
@ -1324,18 +1323,19 @@ var VirtualRenderer = function(container, theme) {
|
|||
_self.container.ownerDocument
|
||||
);
|
||||
|
||||
if (_self.$theme)
|
||||
dom.removeCssClass(_self.container, _self.$theme);
|
||||
if (_self.theme)
|
||||
dom.removeCssClass(_self.container, _self.theme.cssClass);
|
||||
|
||||
_self.$theme = theme ? theme.cssClass : null;
|
||||
// this is kept only for backwards compatibility
|
||||
_self.$theme = theme.cssClass;
|
||||
|
||||
if (_self.$theme)
|
||||
dom.addCssClass(_self.container, _self.$theme);
|
||||
_self.theme = theme;
|
||||
dom.addCssClass(_self.container, theme.cssClass);
|
||||
dom.setCssClass(_self.container, "ace_dark", theme.isDark);
|
||||
|
||||
if (theme && theme.isDark)
|
||||
dom.addCssClass(_self.container, "ace_dark");
|
||||
else
|
||||
dom.removeCssClass(_self.container, "ace_dark");
|
||||
var padding = theme.padding || 4;
|
||||
if (_self.$padding && padding != _self.$padding)
|
||||
_self.setPadding(padding);
|
||||
|
||||
// force re-measure of the gutter width
|
||||
if (_self.$size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue