Skip to content

Commit e633a68

Browse files
committed
Adding a new Visual assist option to help users requiring stronger constrast 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
1 parent cf26e94 commit e633a68

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

ide/main/src/content/editor.js

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function Editor(window) {
4545
//Samit: Enh: now sync other UI elements with the options
4646
self.updateDeveloperTools(self.app.getBooleanOption('showDeveloperTools'));
4747
self.updateExperimentalFeatures(self.app.getBooleanOption('enableExperimentalFeatures'));
48+
self.updateVisualEye(self.app.getBooleanOption('visualEye'));
4849
},
4950

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

720+
//Samit: Enh: Provide a bit of visual assistance
721+
Editor.prototype.updateVisualEye = function (show) {
722+
var container = document.getElementById("visualEyeContainer");
723+
show ? container.classList.add("visualeye") : container.classList.remove("visualeye");
724+
};
725+
719726
Editor.prototype.autoCompleteCommand = function (command) {
720727
var newcmd = command.replace(/^.+ >> /, '');
721728
if (newcmd !== command) {

ide/main/src/content/optionsDialog.xul

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ limitations under the License.
8888
<checkbox id="recordAssertTitle" label="&options.recordAssertTitle.description;"/>
8989
<checkbox id="recordAbsoluteURL" label="&options.recordAbsoluteURL.description;"/>
9090
<checkbox id="showDeveloperTools" label="&options.showDeveloperTools.description;" oncommand="updateReloadButton(this.checked)"/>
91+
<checkbox id="visualEye" label="Visual assist (restart of Selenium IDE is required)"/>
9192
<checkbox id="enableExperimentalFeatures" label="&options.enableExperimentalFeatures.label;"/>
9293
<checkbox id="disableFormatChangeMsg" label="&options.disableFormatChangeMsg.label;"/>
9394
<checkbox id="recordOnOpen" label="&options.recordOnOpen.description;"/>

ide/main/src/content/preferences.js

+1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ SeleniumIDE.Preferences.DEFAULT_OPTIONS = {
164164
disableBadPluginAddon: "true",
165165
enableExperimentalFeatures: "false",
166166
showDeveloperTools: "false",
167+
visualEye: "false",
167168

168169
//Internal data
169170
pluginsData: "[]",

ide/main/src/content/selenium-ide-sidebar.xul

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ limitations under the License.
7373
</toolbar>
7474
</toolbox>
7575

76-
<vbox flex="1">
76+
<vbox id="visualEyeContainer" flex="1">
7777
<hbox width="100" persist="height width" flex="1">
7878
<vbox id="suitePane" persist="height width"/>
7979
<splitter id="suiteTreeSplitter" collapse="before" persist="state">

ide/main/src/content/selenium-ide.xul

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ limitations under the License.
8787
</toolbar>
8888
</toolbox>
8989

90-
<vbox flex="1">
90+
<vbox id="visualEyeContainer" flex="1">
9191
<hbox id="mainhbox" width="150" persist="height width" flex="1">
9292
<vbox id="suitePane" persist="height width" />
9393
<splitter id="suiteTreeSplitter" collapse="before" persist="state">

ide/main/src/skin/classic/selenium-ide.css

+13
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ treechildren::-moz-tree-row(commandFailed)
2020
background-color: #FFCCCC;
2121
}
2222

23+
.visualeye treechildren::-moz-tree-row(commandFailed)
24+
{
25+
background-color: #cc7a7a;
26+
}
27+
2328
treechildren::-moz-tree-row(commandPassed)
2429
{
2530
background-color: #CCFFCC;
@@ -281,6 +286,14 @@ tab label {
281286
text-align: right;
282287
}
283288

289+
.visualeye #suiteProgressRuns {
290+
color: #2fed2f;
291+
}
292+
293+
.visualeye #suiteProgressFailures {
294+
color: #ba0000;
295+
}
296+
284297
#source {
285298
font-family: monospace;
286299
}

0 commit comments

Comments
 (0)