From 0f84ec6ee71acd154069d1a25e2d6f814261c23b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 8 Oct 2007 00:44:49 +0000 Subject: [PATCH] use standard-ish Vim highlight group names for the statusline styling --- content/ui.js | 17 ++++++++++++++- skin/vimperator.css | 52 ++++++++++++--------------------------------- 2 files changed, 30 insertions(+), 39 deletions(-) diff --git a/content/ui.js b/content/ui.js index 4fe76132..f916c03e 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1058,7 +1058,22 @@ function StatusLine() //{{{ this.setClass = function(type) { - status_bar.setAttribute("class", "chromeclass-status status_" + type); + var highlight_group; + + switch (type) + { + case "secure": + highlight_group = "hl-StatusLineSecure"; + break; + case "broken": + highlight_group = "hl-StatusLineBroken"; + break; + case "insecure": + highlight_group = "hl-StatusLine"; + break; + } + + status_bar.setAttribute("class", "chromeclass-status " + highlight_group); }; this.updateUrl = function(url) diff --git a/skin/vimperator.css b/skin/vimperator.css index eab11d71..011c9fc8 100644 --- a/skin/vimperator.css +++ b/skin/vimperator.css @@ -12,8 +12,7 @@ /* the selected item in listboxes is hardly readable without this */ #vimperator-completion > listitem[selected="true"] > listcell, #vimperator-bufferwindow > listitem[selected="true"] > listcell, -#vimperator-previewwindow > listitem[selected="true"] > listcell -{ +#vimperator-previewwindow > listitem[selected="true"] > listcell { background-color: Highlight !important; color: HighlightText !important; } @@ -49,22 +48,6 @@ display: none; } -/* colors for the statusbar */ -/* #status-bar is included so it also gets the right color before the first setClass("insecure") */ -#status-bar, -#status-bar.status_insecure { - background-color: black; - color: white; -} -#status-bar.status_secure { - background-color: #B0FF00; /* light green */ - color: black; -} -#status-bar.status_broken { - background-color: #FF6060; /* light red */ - color: black; -} - #vimperator-commandline { padding: 1px; /* @@ -77,10 +60,6 @@ color: inherit; } -#vimperator-multiline-output { - overflow: hidden; -} - /* highlight groups */ .hl-Normal { @@ -113,28 +92,25 @@ background-color: white; color: red; } - -.hl-Normal { - background-color: white; +.hl-StatusLine { + background-color: black; + color: white; +} +.hl-StatusLineSecure { + background-color: #B0FF00; / * light green * / color: black; } -.hl-ErrorMsg { - background-color: red; - color: white; - font-weight: bold; -} -.hl-MoreMsg { - color: green; - background-color: white; -} -.hl-Title { - color: magenta; - background-color: white; - font-weight: bold; +.hl-StatusLineBroken { + background-color: #FF6060; / * light red * / + color: black; } /* MOW */ +#vimperator-multiline-output { + overflow: hidden; +} + #vimperator-multiline-output-content { white-space: pre; /* -moz-pre-wrap FIXME: Should lines wrap like Vim? */ font-family: -moz-fixed;