aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2013-12-07 13:12:43 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2013-12-07 13:12:43 +0530
commit646180518acdbaeaaeb7d92e911456a19ca3c2a6 (patch)
tree2c6991dfa2cf82ecae66365654fd9f82b9ee61a6 /share
parent659541f4a527aaab416407368418bc6d92552b1e (diff)
Minor fixes in the colors tab
* Show color scheme title in preview box * Show information about setting terminal background color on Apply button mouse hover * Added text_color_for_color method in colors controller scope
Diffstat (limited to 'share')
-rw-r--r--share/tools/web_config/js/colorutils.js4
-rw-r--r--share/tools/web_config/js/controllers.js4
-rw-r--r--share/tools/web_config/partials/colors.html5
-rwxr-xr-xshare/tools/web_config/webconfig.py5
4 files changed, 12 insertions, 6 deletions
diff --git a/share/tools/web_config/js/colorutils.js b/share/tools/web_config/js/colorutils.js
index d04b6049..b78b82a7 100644
--- a/share/tools/web_config/js/colorutils.js
+++ b/share/tools/web_config/js/colorutils.js
@@ -295,7 +295,7 @@ function adjust_lightness(color_str, func) {
/* Given a color, compute a "border color" for it that can show it selected */
function border_color_for_color(color_str) {
- return $scope.adjust_lightness(color_str, function(lightness){
+ return adjust_lightness(color_str, function(lightness){
var adjust = .5
var new_lightness = lightness + adjust
if (new_lightness > 1.0 || new_lightness < 0.0) {
@@ -315,7 +315,7 @@ function text_color_for_color(color_str) {
}
return new_lightness
}
- return $scope.adjust_lightness(color_str, compute_constrast);
+ return adjust_lightness(color_str, compute_constrast);
}
function rgb_to_hsl(r, g, b){
diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js
index 121f2755..385e4e37 100644
--- a/share/tools/web_config/js/controllers.js
+++ b/share/tools/web_config/js/controllers.js
@@ -26,6 +26,10 @@ controllers.controller("colorsController", function($scope, $http) {
$scope.terminalBackgroundColor = color;
}
+ $scope.text_color_for_color = function(color) {
+ return text_color_for_color(color);
+ }
+
$scope.getColorArraysArray = function() {
var result = null;
if ( $scope.selectedColorScheme.colors && $scope.selectedColorScheme.colors.length > 0)
diff --git a/share/tools/web_config/partials/colors.html b/share/tools/web_config/partials/colors.html
index 61757801..69bf6a47 100644
--- a/share/tools/web_config/partials/colors.html
+++ b/share/tools/web_config/partials/colors.html
@@ -1,7 +1,8 @@
<div>
<!-- ko with: color_picker -->
- <span style="padding-left: 25px">Click to customize each color:</span><br>
+ <span style="padding-left: 25px">Click to customize each color: </span><br>
<div class="colorpicker_text_sample" ng-style="{'background-color': terminalBackgroundColor}">
+ <span style="position: absolute; left: 10px; top: -6px;" data-ng-style="{'color': text_color_for_color(selectedColorScheme.preferred_background || 'white')}">{{ selectedColorScheme.name }}</span><br>
<div class="color_picker_background_cells">
<div ng-style="{'background-color': color}" ng-repeat="color in sampleTerminalBackgroundColors" ng-click="changeTerminalBackgroundColor(color)"></div>
</div>
@@ -21,7 +22,7 @@
<br>
<span data-ng-style="{ 'color': selectedColorScheme.command}" ng-click="selectColorSetting('command')">Th</span><span data-ng-style="{ 'color': selectedColorScheme.autosuggestion }" ng-click="selectColorSetting('autosuggestion')"><span class="fake_cursor"><span style="visibility: hidden">i</span></span>s is an autosuggestion</span>
- <span class="save_button" style="position: absolute; right: 5px; bottom: 5px;" data-ng-style="{'color': text_color_for_color(selectedColorScheme.preferred_background || 'white')}" ng-show="showSaveButton" ng-click="setTheme()">Apply</span>
+ <span class="save_button" style="position: absolute; right: 5px; bottom: 5px;" title="Terminal background color is not set automatically on Apply. See your terminal documentation to set its background color." data-ng-style="{'color': text_color_for_color(selectedColorScheme.preferred_background || 'white')}" ng-show="showSaveButton" ng-click="setTheme()">Apply</span>
</div>
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
index 889ae21e..23b89acf 100755
--- a/share/tools/web_config/webconfig.py
+++ b/share/tools/web_config/webconfig.py
@@ -318,8 +318,9 @@ class BindingParser:
# \[1\; is start of control sequence
if c == '1':
- self.get_char();self.get_char()
- c = self.get_char()
+ self.get_char();c = self.get_char()
+ if c == ";":
+ c = self.get_char()
# 3 is Alt
if c == '3':