Skip to content

Commit

Permalink
Adding a new Visual assist option to help users requiring stronger co…
Browse files Browse the repository at this point in the history
…nstrast in colors. It is turned off by default. I am hoping that the difference of 20 in both saturation and brightness is sufficient. Fixes issue 7696
  • Loading branch information
samitbadle committed Sep 22, 2014
1 parent cf26e94 commit e633a68
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ide/main/src/content/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function Editor(window) {
//Samit: Enh: now sync other UI elements with the options
self.updateDeveloperTools(self.app.getBooleanOption('showDeveloperTools'));
self.updateExperimentalFeatures(self.app.getBooleanOption('enableExperimentalFeatures'));
self.updateVisualEye(self.app.getBooleanOption('visualEye'));
},

testSuiteChanged: function (testSuite) {
Expand Down Expand Up @@ -716,6 +717,12 @@ Editor.prototype.updateDeveloperTools = function (show) {
$("reload-button").disabled = !show;
};

//Samit: Enh: Provide a bit of visual assistance
Editor.prototype.updateVisualEye = function (show) {
var container = document.getElementById("visualEyeContainer");
show ? container.classList.add("visualeye") : container.classList.remove("visualeye");
};

Editor.prototype.autoCompleteCommand = function (command) {
var newcmd = command.replace(/^.+ >> /, '');
if (newcmd !== command) {
Expand Down
1 change: 1 addition & 0 deletions ide/main/src/content/optionsDialog.xul
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ limitations under the License.
<checkbox id="recordAssertTitle" label="&options.recordAssertTitle.description;"/>
<checkbox id="recordAbsoluteURL" label="&options.recordAbsoluteURL.description;"/>
<checkbox id="showDeveloperTools" label="&options.showDeveloperTools.description;" oncommand="updateReloadButton(this.checked)"/>
<checkbox id="visualEye" label="Visual assist (restart of Selenium IDE is required)"/>
<checkbox id="enableExperimentalFeatures" label="&options.enableExperimentalFeatures.label;"/>
<checkbox id="disableFormatChangeMsg" label="&options.disableFormatChangeMsg.label;"/>
<checkbox id="recordOnOpen" label="&options.recordOnOpen.description;"/>
Expand Down
1 change: 1 addition & 0 deletions ide/main/src/content/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ SeleniumIDE.Preferences.DEFAULT_OPTIONS = {
disableBadPluginAddon: "true",
enableExperimentalFeatures: "false",
showDeveloperTools: "false",
visualEye: "false",

//Internal data
pluginsData: "[]",
Expand Down
2 changes: 1 addition & 1 deletion ide/main/src/content/selenium-ide-sidebar.xul
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ limitations under the License.
</toolbar>
</toolbox>

<vbox flex="1">
<vbox id="visualEyeContainer" flex="1">
<hbox width="100" persist="height width" flex="1">
<vbox id="suitePane" persist="height width"/>
<splitter id="suiteTreeSplitter" collapse="before" persist="state">
Expand Down
2 changes: 1 addition & 1 deletion ide/main/src/content/selenium-ide.xul
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ limitations under the License.
</toolbar>
</toolbox>

<vbox flex="1">
<vbox id="visualEyeContainer" flex="1">
<hbox id="mainhbox" width="150" persist="height width" flex="1">
<vbox id="suitePane" persist="height width" />
<splitter id="suiteTreeSplitter" collapse="before" persist="state">
Expand Down
13 changes: 13 additions & 0 deletions ide/main/src/skin/classic/selenium-ide.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ treechildren::-moz-tree-row(commandFailed)
background-color: #FFCCCC;
}

.visualeye treechildren::-moz-tree-row(commandFailed)
{
background-color: #cc7a7a;
}

treechildren::-moz-tree-row(commandPassed)
{
background-color: #CCFFCC;
Expand Down Expand Up @@ -281,6 +286,14 @@ tab label {
text-align: right;
}

.visualeye #suiteProgressRuns {
color: #2fed2f;
}

.visualeye #suiteProgressFailures {
color: #ba0000;
}

#source {
font-family: monospace;
}

0 comments on commit e633a68

Please sign in to comment.