Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Themes in Brackets core #7616

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
d12d87b
Initial commit to integrate themes into brackets core
MiguelCastillo Apr 24, 2014
657df85
Delete stale Init.js file
MiguelCastillo Apr 24, 2014
5cb4085
Cleaned up jslint errors/warnings
MiguelCastillo Apr 24, 2014
abf3e49
Removed string.js. Not needed anymore
MiguelCastillo Apr 24, 2014
5473380
Removed custom themes from the themes extension
MiguelCastillo Apr 24, 2014
a1dea7e
Cleaned up extra white spaces
MiguelCastillo Apr 24, 2014
6f1df7a
Adjusted comments to follow convention
MiguelCastillo Apr 24, 2014
361d715
Adding CMD_THEMES to nls strings.js
MiguelCastillo Apr 24, 2014
7a8997f
Checking support to load themes as extensions
MiguelCastillo Apr 26, 2014
2856006
Refactored ExtensionLoader so that it can preload package.json
MiguelCastillo Apr 26, 2014
b0df2fc
Removed logic to load CodeMirror themes automatically
MiguelCastillo Apr 26, 2014
1c64c1a
themes settings css and html files to their styles and htmlContent co…
MiguelCastillo Apr 27, 2014
a572d22
Renames settings.js to settingsmanager.js
MiguelCastillo Apr 27, 2014
e68c3ec
Moved views/settings to ThemeSettingsDialog
MiguelCastillo Apr 27, 2014
43b5abb
Removed paths from settings. That's ole stuff from themes extension
MiguelCastillo Apr 27, 2014
92ac359
Changed (void 0) checks to undefined.
MiguelCastillo Apr 27, 2014
fb54d2f
Merge remote-tracking branch 'upstream/master'
MiguelCastillo Apr 27, 2014
bc7054f
Removed obsolete files
MiguelCastillo Apr 27, 2014
767c9e5
Change exports.THEMES to exports.CMD_THEMES_SETTINGS_OPEN
MiguelCastillo Apr 27, 2014
5c6f83b
Renamed view export from CMD_THEMES_SETTINGS_OPEN to CMD_THEMES_OPEN_…
MiguelCastillo Apr 27, 2014
d83bf29
Removing license file as its no longer needed due to CLA
MiguelCastillo May 6, 2014
0854441
Enabling the use of the package title to be the primary source of the…
MiguelCastillo May 7, 2014
f9d29db
Big refactor to make use of definePreference and rely on its change e…
MiguelCastillo May 7, 2014
d55254f
Reading text files with FileUtils.readAsText
MiguelCastillo May 8, 2014
f686926
Change to use FileUtils.getFileExtension
MiguelCastillo May 8, 2014
02515b1
Exposing theme change event and loadDirectory interface
MiguelCastillo May 8, 2014
e037fc0
Moved CodeMirrorAddons from themes to a global module that brackets uses
MiguelCastillo May 8, 2014
8ee527b
Removed loadList to clean up the code a bit. Also renamed ThemeFiles…
MiguelCastillo May 8, 2014
fe05d09
Fixed issue with selected theme not properly getting select in the se…
MiguelCastillo May 8, 2014
f8eac83
Setting themes up so that it can support mixing themes if we were to …
MiguelCastillo May 8, 2014
1ba4ac0
Added logic to handle correctly setting selected state when selecting…
MiguelCastillo May 8, 2014
5bd2d89
Removed mark-selection add-on. Will add this in a different PR. Als…
MiguelCastillo May 9, 2014
e46a93d
Removed require CodeMirror as its no longer needed
MiguelCastillo May 9, 2014
b2d0702
Merge remote-tracking branch 'upstream/master'
MiguelCastillo May 9, 2014
768d2f0
Added I18 string support to the dialog
MiguelCastillo May 9, 2014
2c74247
Corrected comment and some formatting in string.js
MiguelCastillo May 9, 2014
a1f6c6a
Merge remote-tracking branch 'upstream/master'
MiguelCastillo May 16, 2014
bce17ad
Merge remote-tracking branch 'upstream/master'
MiguelCastillo May 23, 2014
9832add
Major rewrite to move code around to be more inline with Brackets cor…
MiguelCastillo May 29, 2014
6cf0eae
Merge remote-tracking branch 'upstream/master'
MiguelCastillo May 29, 2014
803c26f
Fixed issue with unnecessary reload of themes when opening a new docu…
MiguelCastillo May 29, 2014
fc498a8
Chages to remove extra white spaces in expressions to follow Brackets…
MiguelCastillo May 29, 2014
796322a
Merge general settings and theme settings because there is only one t…
MiguelCastillo May 29, 2014
2f94472
Another style change
MiguelCastillo May 29, 2014
ff3c065
Moving code mirror add ons back to brackets.js
MiguelCastillo May 29, 2014
ab93c01
Moved Theme to ThemeManager
MiguelCastillo May 31, 2014
1d81228
Corrected issue with documents not getting properly styles with a theme
MiguelCastillo Jun 1, 2014
8d94e86
Removed force reload when appReady is resolved
MiguelCastillo Jun 1, 2014
7834318
Refactored ThemeManager to merge several functions to make the code a…
MiguelCastillo Jun 1, 2014
280c83e
Added documentation to ThemeManager.js
MiguelCastillo Jun 2, 2014
72f6354
Adding comment I mistakenly changed
MiguelCastillo Jun 3, 2014
43ed137
Fixed issue where themes that no longer existed would cause the theme…
MiguelCastillo Jun 5, 2014
1c05805
Removed temp code to load all code mirror themes
MiguelCastillo Jun 5, 2014
ea1aab0
Fixed issue with theme not being applied when set while no documents …
MiguelCastillo Jun 5, 2014
1416cd9
Remove old css file to avoid weird flashes when saving a theme
MiguelCastillo Jun 5, 2014
8bfd51e
Adjusted code mirror override to allow for themes to override the def…
MiguelCastillo Jun 5, 2014
ef8b5cd
Adding initial default themes. Thor Dark and Thor Light
MiguelCastillo Jun 6, 2014
2c06fd2
Added importance to make sure cursor is visible when it is on the lef…
MiguelCastillo Jun 6, 2014
c38e68d
Merge remote-tracking branch 'upstream/master'
MiguelCastillo Jun 6, 2014
79f7350
Merge remote-tracking branch 'upstream/master'
MiguelCastillo Jun 7, 2014
aebe379
Removed stale general.html file
MiguelCastillo Jun 7, 2014
8cef24a
Fixed issues in CM override less file that's breaking the build
MiguelCastillo Jun 7, 2014
710d4e0
Fixed issue where themes aren't properly reloaded when modified
MiguelCastillo Jun 7, 2014
9894c0e
Removed leftover console.log statement
MiguelCastillo Jun 7, 2014
72f5f34
Fixed issue with document types not properly cleaned up from the DOM.…
MiguelCastillo Jun 7, 2014
57df196
Reverted back tune up changes in codemirror-override. Will do anothe…
MiguelCastillo Jun 8, 2014
7f5a33c
Added rootpath to handle imports defined in styles/brackets*.less fil…
MiguelCastillo Jun 8, 2014
d71bbcb
Tweaked darkt theme and removed #status-overwrite text color that int…
Jun 8, 2014
cdfa4be
Using default Brackets theme as default light theme.
Jun 8, 2014
1491ad3
More dark theme tweaks.
Jun 8, 2014
9188e5c
Merge pull request #1 from MiguelCastillo/larz/theme-tweaks
MiguelCastillo Jun 8, 2014
22fc569
Removed extra call the get promise object. Redundant.
MiguelCastillo Jun 17, 2014
67abe19
Removed stale dependency
MiguelCastillo Jun 20, 2014
e14f151
Added a default to be loaded when the current theme isn't available. …
MiguelCastillo Jun 20, 2014
d302434
Merge remote-tracking branch 'upstream/master'
MiguelCastillo Jun 20, 2014
31cb2a6
Export reset settings interface and set the default theme to thor-lig…
MiguelCastillo Jun 20, 2014
b6a7ef3
Changed loop for iterating through new settings. Feedback from Kevin
MiguelCastillo Jun 20, 2014
86f78eb
Cleaned up a bit of the logic for selecting themes in the event handl…
MiguelCastillo Jun 20, 2014
a102a51
Cleaned up some of the comments and stale variables
MiguelCastillo Jun 20, 2014
0ce29ce
Merge remote-tracking branch 'upstream/master'
MiguelCastillo Jun 27, 2014
c2d26f2
Removing extra promise call
MiguelCastillo Jun 27, 2014
8f2619f
Conflict resolution for CodeMirror
MiguelCastillo Jun 29, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ define(function (require, exports, module) {
NativeApp = require("utils/NativeApp"),
DeprecationWarning = require("utils/DeprecationWarning"),
ViewCommandHandlers = require("view/ViewCommandHandlers"),
ThemeManager = require("themes/ThemeManager"),
_ = require("thirdparty/lodash");

// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
Expand Down
1 change: 1 addition & 0 deletions src/command/Commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ define(function (require, exports, module) {
exports.SORT_WORKINGSET_BY_NAME = "view.sortWorkingSetByName"; // WorkingSetSort.js _handleSortWorkingSetByName()
exports.SORT_WORKINGSET_BY_TYPE = "view.sortWorkingSetByType"; // WorkingSetSort.js _handleSortWorkingSetByType()
exports.SORT_WORKINGSET_AUTO = "view.sortWorkingSetAuto"; // WorkingSetSort.js _handleAutomaticSort()
exports.THEMES = "view.themes"; // MenuCommands.js Settings.open()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under // VIEW since is the first element in the menu, and should we call CMD_THEMES?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is under views... Nothing starts with CMD in that file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be exports.CMD_THEMES. The team decided to do this so that there are no issues when moving/renaming menus. Commands should no longer be assigned to a menu, so CMD_ is the solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SAplayer Just to clear, themes will be the ONLY definition that starts with CMD... Is that what you are looking to do with the rest of the definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomMalbran I see what you mean by being under //VIEW... I read it as put it under the //VIEW group rather than make it the first definition. Yeah, sure I can move that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the Find commands start with CMD_.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SAplayer @TomMalbran Really guys, I am not trying to be a hard ass or anything... I prefer to follow convention. Majority of the does NOT start with CMD_, therefore I didn't start mine with CMD_. I will change it to CMD_ so that we can move on, but I am really looking to understand what the plan is long term. And it seems like everything will be eventually changed to CMD_.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is something new. Here is more info: #7556


// NAVIGATE
exports.NAVIGATE_NEXT_DOC = "navigate.nextDoc"; // DocumentCommandHandlers.js handleGoNextDoc()
Expand Down
2 changes: 2 additions & 0 deletions src/command/DefaultMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ define(function (require, exports, module) {
* View menu
*/
menu = Menus.addMenu(Strings.VIEW_MENU, Menus.AppMenuBar.VIEW_MENU);
menu.addMenuItem(Commands.THEMES);
menu.addMenuDivider();
menu.addMenuItem(Commands.VIEW_HIDE_SIDEBAR);
menu.addMenuDivider();
menu.addMenuItem(Commands.VIEW_INCREASE_FONT_SIZE);
Expand Down
46 changes: 20 additions & 26 deletions src/extensibility/ExtensionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ define(function (require, exports, module) {
Package = require("extensibility/Package"),
Async = require("utils/Async"),
ExtensionLoader = require("utils/ExtensionLoader"),
ExtensionUtils = require("utils/ExtensionUtils"),
FileSystem = require("filesystem/FileSystem"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils");
StringUtils = require("utils/StringUtils"),
ThemeManager = require("themes/ThemeManager");

// semver.browser is an AMD-compatible module
var semver = require("extensibility/node/node_modules/semver/semver.browser");
Expand Down Expand Up @@ -132,6 +134,21 @@ define(function (require, exports, module) {

$(exports).triggerHandler("registryUpdate", [id]);
}


/**
* @private
* Verifies if an extension is a theme based on the presence of the field "theme"
* in the package.json. If it is a theme, then the theme file is just loaded by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2 spaces

* ThemeManager
*/
function loadTheme(id) {
var extension = extensions[id];
if ( extension.installInfo && extension.installInfo.metadata && extension.installInfo.metadata.theme ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, trailing and leading whitespace in parentheses is not common, or not even accepted, in Brackets' coding conventions.
You've got that multiple times.

ThemeManager.loadFile(extension.installInfo.path + "/" + extension.installInfo.metadata.theme);
}
}


/**
* @private
Expand Down Expand Up @@ -185,30 +202,6 @@ define(function (require, exports, module) {
return result.promise();
}

/**
* @private
* Loads the package.json file in the given extension folder.
* @param {string} folder The extension folder.
* @return {$.Promise} A promise object that is resolved with the parsed contents of the package.json file,
* or rejected if there is no package.json or the contents are not valid JSON.
*/
function _loadPackageJson(folder) {
var file = FileSystem.getFileForPath(folder + "/package.json"),
result = new $.Deferred();
FileUtils.readAsText(file)
.done(function (text) {
try {
var json = JSON.parse(text);
result.resolve(json);
} catch (e) {
result.reject();
}
})
.fail(function () {
result.reject();
});
return result.promise();
}

/**
* @private
Expand Down Expand Up @@ -245,10 +238,11 @@ define(function (require, exports, module) {
status: (e.type === "loadFailed" ? START_FAILED : ENABLED)
};
synchronizeEntry(id);
loadTheme(id);
$(exports).triggerHandler("statusChange", [id]);
}

_loadPackageJson(path)
ExtensionUtils.loadPackageJson(path)
.done(function (metadata) {
setData(metadata.name, metadata);
})
Expand Down
1 change: 1 addition & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ define({
"CMD_SORT_WORKINGSET_BY_NAME" : "Sort by Name",
"CMD_SORT_WORKINGSET_BY_TYPE" : "Sort by Type",
"CMD_SORT_WORKINGSET_AUTO" : "Automatic Sort",
"CMD_THEMES" : "Themes",

// Navigate menu Commands
"NAVIGATE_MENU" : "Navigate",
Expand Down
40 changes: 40 additions & 0 deletions src/themes/CodeMirrorAddons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these CodeMirror addons added automatically with themes? Is there some connection between themes and these addons?

If there is some reason why we must enable these addons, we should do so in the main place where we enable CM addons (which I don't know offhand, but I'm sure it's there somewhere 😁)

* Brackets Themes Copyright (c) 2014 Miguel Castillo.
*
* Licensed under MIT
*/


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global $, define, require */

define(function () {
"use strict";

var CodeMirror = require("thirdparty/CodeMirror2/lib/codemirror");

function initAddons() {
// Set some default value for codemirror...
CodeMirror.defaults.highlightSelectionMatches = true;
CodeMirror.defaults.styleSelectedText = true;
}

function init() {
var deferred = $.Deferred();

/**
* This is where is all starts to load up...
*/
require([
"thirdparty/CodeMirror2/addon/selection/mark-selection",
"thirdparty/CodeMirror2/addon/search/match-highlighter"
], deferred.resolve);

return deferred.done(initAddons).promise();
}

return {
ready: init()
};
});

29 changes: 29 additions & 0 deletions src/themes/DefaultSettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably just go in Settings.js

* Brackets Themes Copyright (c) 2014 Miguel Castillo.
*
* Licensed under MIT
*/


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global $, define, require */

define(function(require) {
"use strict";

var FileUtils = require("file/FileUtils");
var cm_path = FileUtils.getNativeBracketsDirectoryPath() + "/thirdparty/CodeMirror2";

return {
"fontSize": 12,
"lineHeight": '1.3em',
"fontType": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"customScrollbars": true,
"theme": ["default"],
"paths": [
{path:require.toUrl("./") + "../../themes"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after colon (Coding Conventions)

{path:require.toUrl("./theme/")},
{path:cm_path + "/theme"}
]
};
});
44 changes: 44 additions & 0 deletions src/themes/FontCommandsManager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be merged into ViewCommandHandlers. In fact, it may make sense to put the code in src/view/themes and some of what's here could be merged into existing files in src/view. I need to go for now, but I'll come back to that thought...

* Brackets Themes Copyright (c) 2014 Miguel Castillo.
* @author Brad Gearon
*
* Licensed under MIT
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global $, define, require */

define(function (require) {
"use strict";

var Settings = require("themes/Settings"),
DefaultSettings = require("themes/DefaultSettings"),
ViewCommandHandlers = require("view/ViewCommandHandlers"),
PreferencesManager = require("preferences/PreferencesManager");

function ViewCommandsManager () {
$(ViewCommandHandlers).on("fontSizeChange", updateThemeFontSize);
$(Settings).on("change:fontSize", updateBracketsFontSize);
updateBracketsFontSize();
}

function updateThemeFontSize (evt, adjustment, fontSize /*, lineHeight*/) {
Settings.setValue("fontSize", fontSize);
}

function updateBracketsFontSize() {
var fontSize = Settings.getValue("fontSize"),
fontSizeNumeric = Number(fontSize.replace(/px|em/, "")),
fontSizeOffset = fontSizeNumeric - DefaultSettings.fontSize;

if(!isNaN(fontSizeOffset)) {
PreferencesManager.setViewState("fontSizeAdjustment", fontSizeOffset);
PreferencesManager.setViewState("fontSizeStyle", fontSize);
}
}

// Let's make sure we use Themes fonts by default
return {
init: ViewCommandsManager
};
});
65 changes: 65 additions & 0 deletions src/themes/FontSettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font settings should be merged with the Increase/Decrease Font Size commands. I am thinking that we should make the fontSizeStyle view state a preference to store the font size and add a new preferences for the line height and the font family. But to make things simpler, the font size preference should just be a number which is then interpreted as the size of the font in px, and the line height should also be a number (float) which is then interpreted as the line height in ems. All these preference will be added in ViewCommandsHandlers so that we can use the same functions to update the style when the preferences change.

Since we don't have an UI for the preferences I am not sure if we should keep the UI used with the themes or just don't use any UI at the moment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe all these can be part of a different PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a UI to change themes at the very least, and I'd rather we have a dialog box with a few appearance-related settings than add a top-level menu.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind keeping the dialog. But when saving, it should only change the preferences values and the code in View Commands Manger can deal with the preference change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomMalbran Yeah, optimally font values will be read/set from a core api. I remember some conversation we had around this here #7185. The idea was to make possibly make _adjustFontSize public. Adding the settings as you explain as view states will definitely help in the long run. If some makes those changes, I will be happy to make use of them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened #7800 to log that we should change the font size handling before landing themes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Once #7800 is merged, we should remove all the preferences here, and just call the methods from the View Commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, that would be super awesome and will clean up the code real nicely.

* Brackets Themes Copyright (c) 2014 Miguel Castillo.
*
* Licensed under MIT
*/


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global $, define, require */

define(function () {
"use strict";

var $lineHeight = $("<style type='text/css' id='lineHeight'>").appendTo("head"),
$fontSize = $("<style type='text/css' id='fontSize'>").appendTo("head"),
$fontType = $("<style type='text/css' id='fontType'>").appendTo("head");

var Settings = null;


function FontSettings(_settings) {
Settings = _settings;
$(Settings).on("change:lineHeight", FontSettings.updateLineHeight);
$(Settings).on("change:fontSize", FontSettings.updateFontSize);
$(Settings).on("change:fontType", FontSettings.updateFontType);
FontSettings.update();
}


FontSettings.updateLineHeight = function () {
clearFonts();
var value = Settings.getValue("lineHeight");
$lineHeight.text(".CodeMirror{" + "line-height: " + value + "; }");
};


FontSettings.updateFontSize = function () {
clearFonts();
var value = Settings.getValue("fontSize");
$fontSize.text(".CodeMirror{" + "font-size: " + value + " !important; }");
};


FontSettings.updateFontType = function () {
clearFonts();
var value = Settings.getValue("fontType");
$fontType.text(".CodeMirror{" + "font-family: " + value + " !important; }");
};


FontSettings.update = function () {
clearFonts();
FontSettings.updateLineHeight();
FontSettings.updateFontSize();
FontSettings.updateFontType();
};


function clearFonts() {
// Remove this tag that is intefering with font settings set in this module
$("#codemirror-dynamic-fonts").remove();
}

return FontSettings;
});
21 changes: 21 additions & 0 deletions src/themes/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) 2014 Miguel Castillo.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file just goes away as all of our code is MIT and newly contributed code comes in under the CLA.


Licensed under MIT

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
19 changes: 19 additions & 0 deletions src/themes/MenuCommands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Brackets Themes Copyright (c) 2014 Miguel Castillo.
*
* Licensed under MIT
*/


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global $, define, require */

define(function(require) {
"use strict";
var Commands = require("command/Commands"),
CommandManager = require("command/CommandManager"),
Strings = require("strings"),
Settings = require("themes/Settings");

CommandManager.register(Strings.CMD_THEMES, Commands.THEMES, Settings.open);
});
Loading