kopia lustrzana https://github.com/c9/core
do not stay idle while loading theme css
rodzic
530d8dc934
commit
c29c0b75e0
|
@ -182,15 +182,13 @@ define(function(require, exports, module) {
|
||||||
emit("eachTheme", { changed: true });
|
emit("eachTheme", { changed: true });
|
||||||
setGeckoMask();
|
setGeckoMask();
|
||||||
|
|
||||||
if (!oldTheme) return;
|
|
||||||
|
|
||||||
var auto = emit("themeChange", {
|
var auto = emit("themeChange", {
|
||||||
theme: theme,
|
theme: theme,
|
||||||
oldTheme: oldTheme,
|
oldTheme: oldTheme,
|
||||||
type: type
|
type: type
|
||||||
}) !== false;
|
}) !== false;
|
||||||
|
|
||||||
if (noquestion) return;
|
if (!oldTheme || noquestion) return;
|
||||||
|
|
||||||
if (auto)
|
if (auto)
|
||||||
return emit("themeDefaults", { theme: theme, type: type });
|
return emit("themeDefaults", { theme: theme, type: type });
|
||||||
|
|
|
@ -73,9 +73,10 @@ define(function(require, exports, module) {
|
||||||
});
|
});
|
||||||
|
|
||||||
preload(function(err) {
|
preload(function(err) {
|
||||||
register(null, {
|
});
|
||||||
"layout.preload": plugin
|
|
||||||
});
|
register(null, {
|
||||||
|
"layout.preload": plugin
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -139,18 +139,20 @@ define(function(require, exports, module) {
|
||||||
settings.on("user/output", setSettings);
|
settings.on("user/output", setSettings);
|
||||||
|
|
||||||
layout.on("themeChange", function(e) {
|
layout.on("themeChange", function(e) {
|
||||||
var skin = e.oldTheme;
|
var colors = defaults[e.oldTheme];
|
||||||
if (!(settings.get("user/output/@backgroundColor") == defaults[skin][0] &&
|
if (!colors) return;
|
||||||
settings.get("user/output/@foregroundColor") == defaults[skin][1] &&
|
if (!(settings.get("user/output/@backgroundColor") == colors[0] &&
|
||||||
settings.get("user/output/@selectionColor") == defaults[skin][2]))
|
settings.get("user/output/@foregroundColor") == colors[1] &&
|
||||||
|
settings.get("user/output/@selectionColor") == colors[2]))
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
layout.on("themeDefaults", function(e) {
|
layout.on("themeDefaults", function(e) {
|
||||||
var skin = e.theme;
|
var colors = defaults[e.theme];
|
||||||
settings.set("user/output/@backgroundColor", defaults[skin][0]);
|
if (!colors) return;
|
||||||
settings.set("user/output/@foregroundColor", defaults[skin][1]);
|
settings.set("user/output/@backgroundColor", colors[0]);
|
||||||
settings.set("user/output/@selectionColor", defaults[skin][2]);
|
settings.set("user/output/@foregroundColor", colors[1]);
|
||||||
|
settings.set("user/output/@selectionColor", colors[2]);
|
||||||
}, handle);
|
}, handle);
|
||||||
|
|
||||||
// Settings UI
|
// Settings UI
|
||||||
|
|
Ładowanie…
Reference in New Issue