mirror of
https://github.com/google/blockly.git
synced 2026-01-20 23:37:09 +01:00
Update component names (#3549)
This commit is contained in:
@@ -228,7 +228,7 @@ Blockly.Flyout.prototype.createDom = function(tagName) {
|
||||
{'class': 'blocklyFlyoutBackground'}, this.svgGroup_);
|
||||
this.svgGroup_.appendChild(this.workspace_.createDom());
|
||||
this.workspace_.getThemeManager().subscribe(
|
||||
this.svgBackground_, 'flyout', 'fill');
|
||||
this.svgBackground_, 'flyoutBackgroundColour', 'fill');
|
||||
this.workspace_.getThemeManager().subscribe(
|
||||
this.svgBackground_, 'flyoutOpacity', 'fill-opacity');
|
||||
this.workspace_.getMarkerManager().setCursor(new Blockly.FlyoutCursor());
|
||||
|
||||
@@ -160,7 +160,8 @@ Blockly.FlyoutButton.prototype.createDom = function() {
|
||||
svgText.textContent = text;
|
||||
if (this.isLabel_) {
|
||||
this.svgText_ = svgText;
|
||||
this.workspace_.getThemeManager().subscribe(this.svgText_, 'flyoutText', 'fill');
|
||||
this.workspace_.getThemeManager().subscribe(this.svgText_,
|
||||
'flyoutForegroundColour', 'fill');
|
||||
}
|
||||
|
||||
this.width = Blockly.utils.dom.getTextWidth(svgText);
|
||||
|
||||
@@ -182,7 +182,8 @@ Blockly.createMainWorkspace_ = function(svg, options, blockDragSurface,
|
||||
mainWorkspace.addZoomControls();
|
||||
}
|
||||
// Register the workspace svg as a UI component.
|
||||
mainWorkspace.getThemeManager().subscribe(svg, 'workspace', 'background-color');
|
||||
mainWorkspace.getThemeManager().subscribe(svg, 'workspaceBackgroundColour',
|
||||
'background-color');
|
||||
|
||||
// A null translation will also apply the correct initial scale.
|
||||
mainWorkspace.translate(0, 0);
|
||||
|
||||
@@ -628,7 +628,7 @@ Blockly.Scrollbar.prototype.createDom_ = function(opt_class) {
|
||||
},
|
||||
this.svgGroup_);
|
||||
this.workspace_.getThemeManager().subscribe(
|
||||
this.svgHandle_, 'scrollbar', 'fill');
|
||||
this.svgHandle_, 'scrollbarColour', 'fill');
|
||||
this.workspace_.getThemeManager().subscribe(
|
||||
this.svgHandle_, 'scrollbarOpacity', 'fill-opacity');
|
||||
Blockly.utils.dom.insertAfter(this.outerSvg_,
|
||||
|
||||
@@ -119,13 +119,13 @@ Blockly.Themes.Dark =
|
||||
new Blockly.Theme('dark', Blockly.Themes.Dark.defaultBlockStyles,
|
||||
Blockly.Themes.Dark.categoryStyles);
|
||||
|
||||
Blockly.Themes.Dark.setComponentStyle('workspace', '#1e1e1e');
|
||||
Blockly.Themes.Dark.setComponentStyle('toolbox', '#333');
|
||||
Blockly.Themes.Dark.setComponentStyle('toolboxText', '#fff');
|
||||
Blockly.Themes.Dark.setComponentStyle('flyout', '#252526');
|
||||
Blockly.Themes.Dark.setComponentStyle('flyoutText', '#ccc');
|
||||
Blockly.Themes.Dark.setComponentStyle('workspaceBackgroundColour', '#1e1e1e');
|
||||
Blockly.Themes.Dark.setComponentStyle('toolboxBackgroundColour', '#333');
|
||||
Blockly.Themes.Dark.setComponentStyle('toolboxForegroundColour', '#fff');
|
||||
Blockly.Themes.Dark.setComponentStyle('flyoutBackgroundColour', '#252526');
|
||||
Blockly.Themes.Dark.setComponentStyle('flyoutForegroundColour', '#ccc');
|
||||
Blockly.Themes.Dark.setComponentStyle('flyoutOpacity', 1);
|
||||
Blockly.Themes.Dark.setComponentStyle('scrollbar', '#797979');
|
||||
Blockly.Themes.Dark.setComponentStyle('scrollbarColour', '#797979');
|
||||
Blockly.Themes.Dark.setComponentStyle('scrollbarOpacity', 0.4);
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,8 +163,9 @@ Blockly.Toolbox.prototype.init = function() {
|
||||
this.HtmlDiv.setAttribute('dir', workspace.RTL ? 'RTL' : 'LTR');
|
||||
svg.parentNode.insertBefore(this.HtmlDiv, svg);
|
||||
var themeManager = workspace.getThemeManager();
|
||||
themeManager.subscribe(this.HtmlDiv, 'toolbox', 'background-color');
|
||||
themeManager.subscribe(this.HtmlDiv, 'toolboxText', 'color');
|
||||
themeManager.subscribe(this.HtmlDiv, 'toolboxBackgroundColour',
|
||||
'background-color');
|
||||
themeManager.subscribe(this.HtmlDiv, 'toolboxForegroundColour', 'color');
|
||||
|
||||
// Clicking on toolbox closes popups.
|
||||
Blockly.bindEventWithChecks_(this.HtmlDiv, 'mousedown', this,
|
||||
|
||||
@@ -717,7 +717,8 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
||||
this.svgBackground_.style.fill =
|
||||
'url(#' + this.grid_.getPatternId() + ')';
|
||||
} else {
|
||||
this.themeManager_.subscribe(this.svgBackground_, 'workspace', 'fill');
|
||||
this.themeManager_.subscribe(this.svgBackground_,
|
||||
'workspaceBackgroundColour', 'fill');
|
||||
}
|
||||
}
|
||||
/** @type {SVGElement} */
|
||||
|
||||
Reference in New Issue
Block a user