1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 21:22:26 +01:00

move the statusbar color handling to the css file. for the future, whenever a background color is set, the foreground color should also be set, otherwise text might be unreadable in dark themes (or light themes, depending on what theme the user has)

This commit is contained in:
Viktor Kojouharov
2007-05-20 13:53:57 +00:00
parent c5ddcea49e
commit f07b29beac
3 changed files with 19 additions and 3 deletions

View File

@@ -78,3 +78,15 @@ table.settings {
.setting { font-weight: bold; color: #106326; }
.argument { color: #6A97D4; }
.version { position:absolute; top:10px; right:2%; color:#C0C0C0; text-align:right; }
.status_insecure, .status_insecure * {
background-color: transparent;
}
.status_secure, .status_secure * {
background-color: yellow;
color: black;
}
.status_broken, .status_broken * {
background-color: #ff9900;
color: black;
}

View File

@@ -656,6 +656,10 @@ function StatusLine()
color = "transparent";
statusline_widget.setAttribute("style", "background-color: " + color);
};
this.setClass = function(class)
{
statusline_widget.setAttribute("class", "status_" + class);
};
this.updateUrl = function(url)
{

View File

@@ -147,11 +147,11 @@ nsBrowserStatusHandler2.prototype =
{
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
if(aState & nsIWebProgressListener.STATE_IS_INSECURE)
vimperator.statusline.setColor("transparent");
vimperator.statusline.setClass("insecure");
else if(aState & nsIWebProgressListener.STATE_IS_BROKEN)
vimperator.statusline.setColor("orange");
vimperator.statusline.setClass("broken");
else if(aState & nsIWebProgressListener.STATE_IS_SECURE)
vimperator.statusline.setColor("yellow");
vimperator.statusline.setClass("secure");
return 0;
}