Skip to content

Commit

Permalink
Made ESB compatible with dark themes, Fixes #35
Browse files Browse the repository at this point in the history
  • Loading branch information
kustodian committed Oct 10, 2014
1 parent 30f433e commit 46dd020
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 76 deletions.
8 changes: 0 additions & 8 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ function startup(data,reason)
if (!styleService.sheetRegistered(uri, styleService.AUTHOR_SHEET)) {
styleService.loadAndRegisterSheet(uri, styleService.AUTHOR_SHEET);
}
uri = NetUtil.newURI("chrome://extendedstatusbar/skin/extendedstatusbaroptions.css");
if (!styleService.sheetRegistered(uri, styleService.AUTHOR_SHEET)) {
styleService.loadAndRegisterSheet(uri, styleService.AUTHOR_SHEET);
}
}
function install(data, reason)
{
Expand Down Expand Up @@ -73,10 +69,6 @@ function shutdown(data, reason)
if (styleService.sheetRegistered(uri, styleService.AUTHOR_SHEET)) {
styleService.unregisterSheet(uri, styleService.AUTHOR_SHEET);
}
uri = NetUtil.newURI("chrome://extendedstatusbar/skin/extendedstatusbaroptions.css");
if (styleService.sheetRegistered(uri, styleService.AUTHOR_SHEET)) {
styleService.unregisterSheet(uri, styleService.AUTHOR_SHEET);
}

//cache clearing
Services.obs.notifyObservers(null, "chrome-flush-caches", null);
Expand Down
10 changes: 5 additions & 5 deletions chrome/content/esbpref.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pref("extensions.extendedstatusbar.hidetoolbar", true);
pref("extensions.extendedstatusbar.hidetimeout", 3);
pref("extensions.extendedstatusbar.showonhover", false);
pref("extensions.extendedstatusbar.hovertimeout", 500);
pref("extensions.extendedstatusbar.backgroundcolor", "#DCDCDC");
pref("extensions.extendedstatusbar.progresscolor", "#A9A9A9");
pref("extensions.extendedstatusbar.cursorcolor", "#FFCC66");
pref("extensions.extendedstatusbar.backgroundcolor", "");
pref("extensions.extendedstatusbar.progresscolor", "");
pref("extensions.extendedstatusbar.cursorcolor", "");
pref("extensions.extendedstatusbar.textcolor", "");
pref("extensions.extendedstatusbar.usecustomcolor", false);
pref("extensions.extendedstatusbar.hideonsites", "");
Expand All @@ -16,8 +16,8 @@ pref("extensions.extendedstatusbar.hideloaded", false);
pref("extensions.extendedstatusbar.hidespeed", false);
pref("extensions.extendedstatusbar.hidetime", false);
pref("extensions.extendedstatusbar.hidepercent", false);
pref("extensions.extendedstatusbar.hideprogress", false);
pref("extensions.extendedstatusbar.hidecursor", false);
pref("extensions.extendedstatusbar.hideprogress", true);
pref("extensions.extendedstatusbar.hidecursor", true);
pref("extensions.extendedstatusbar.slimmode", false);
pref("extensions.extendedstatusbar.toolbarstyle", "");
pref("extensions.extendedstatusbar.widgetstyle", "");
Expand Down
7 changes: 0 additions & 7 deletions chrome/content/extendedstatusbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ XULExtendedStatusbarChrome.ESB_PrefObserver = {
break;
case "progresscolor":
this.appendStyleAtribute("ESB_percent_progressbar", "background-color", this.prefs.getCharPref("progresscolor"));
this.appendStyleAtribute("ESB_loaded_finished_progressbar", "background-color", this.prefs.getCharPref("progresscolor"));
break;
case "cursorcolor":
this.appendStyleAtribute("ESB_loaded_working_progressbar", "border-right", "10px solid " + this.prefs.getCharPref("cursorcolor"));
Expand Down Expand Up @@ -1230,12 +1229,6 @@ XULExtendedStatusbarChrome.ESB_PrefObserver = {
if(XULExtendedStatusbarChrome.esbXUL.percent_progressbar.style.backgroundColor) XULExtendedStatusbarChrome.esbXUL.percent_progressbar.style.backgroundColor = this.prefs.getCharPref("progresscolor");
else this.appendStyleAtribute("ESB_percent_progressbar", "background-color", this.prefs.getCharPref("progresscolor"));

if(XULExtendedStatusbarChrome.esbXUL.loaded_finished_progressbar.style.backgroundColor) XULExtendedStatusbarChrome.esbXUL.loaded_finished_progressbar.style.backgroundColor = this.prefs.getCharPref("progresscolor");
else this.appendStyleAtribute("ESB_loaded_finished_progressbar", "background-color", this.prefs.getCharPref("progresscolor"));

if(XULExtendedStatusbarChrome.esbXUL.loaded_working_progressbar.style.backgroundColor) XULExtendedStatusbarChrome.esbXUL.loaded_working_progressbar.style.backgroundColor = this.prefs.getCharPref("progresscolor");
else this.appendStyleAtribute("ESB_loaded_working_progressbar", "background-color", this.prefs.getCharPref("progresscolor"));

if(XULExtendedStatusbarChrome.esbXUL.loaded_working_progressbar.style.borderRight) XULExtendedStatusbarChrome.esbXUL.loaded_working_progressbar.style.borderRight = "10px solid " + this.prefs.getCharPref("cursorcolor");
else this.appendStyleAtribute("ESB_loaded_working_progressbar", "border-right", "10px solid " + this.prefs.getCharPref("cursorcolor"));
}
Expand Down
52 changes: 26 additions & 26 deletions chrome/skin/extendedstatusbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/* We need to see the spacer in customization mode */
#main-window[customize-entered] #ESB_toolbarspacer
{
background-color: grey;
background-color: gray;
}

/* We need to adapt the widget for the customization panel */
Expand Down Expand Up @@ -74,76 +74,76 @@
/* Default colors */
#ESB_loaded_working_progressbar
{
border-right: 10px solid LightGray;
border-right: 10px solid darkgray;
}

#ESB_loaded_finished_progressbar
{
background-color: DarkGrey;
/*background-color: darkgray;*/
}

#ESB_percent_progressbar
{
background-color: DarkGrey;
background-color: darkgray;
}

/* Newstyle */
#ESB_status_bar.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
}

#ESB_percent_box.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
width:135px;
border-right:1px solid;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
width: 135px;
border-right: 1px solid;
}

#ESB_images_box.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right:1px solid;
width:105px;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right: 1px solid;
width: 105px;
}

#ESB_loaded_box.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right:1px solid;
width:120px;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right: 1px solid;
width: 120px;
}

#ESB_speed_box.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right:1px solid;
width:115px;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right: 1px solid;
width: 115px;
}

#ESB_time_box.newstyle
{
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right:1px solid;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right: 1px solid;
}

#ESB_percent_progressbar.newstyle
{
background-color:Darkgrey;
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
background-color: darkgray;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
}

#ESB_loaded_finished_progressbar.newstyle
{
background-color:Darkgrey;
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
background-color: darkgray;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
}

#ESB_loaded_working_progressbar.newstyle
{
background-color:Darkgrey;
background-image:url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right:10px solid Lightgrey;
background-color: darkgray;
background-image: url(chrome://extendedstatusbar/skin/white_trans_grad.png);
border-right: 10px solid lightgray;
}

#ESB_options_context_item
Expand Down
57 changes: 27 additions & 30 deletions chrome/skin/extendedstatusbaroptions.css
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
@import url("chrome://global/skin/");

@-moz-document url("chrome://browser/content/browser.xul") {
.picker {
width: 38px;
height: 24px;
border: 2px solid;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
background-color: ThreeDFace;
}

.picker {
width: 38px;
height: 24px;
border: 2px solid;
-moz-border-top-colors: ThreeDLightShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDLightShadow ThreeDHighlight;
background-color: ThreeDFace;
}
.colorbox {
border: 1px solid #000000;
}

.colorbox {
border: 1px solid #000000;
}
.picker:focus {
-moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight;
}

.picker:focus {
-moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight;
}
.picker[open="true"] {
-moz-border-top-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
}

.picker[open="true"] {
-moz-border-top-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
}

#backcolorBox, #progresscolorBox, #cursorcolorBox, #textcolorBox {
padding:3px;
}
#backcolorBox, #progresscolorBox, #cursorcolorBox, #textcolorBox {
padding:3px;
}

0 comments on commit 46dd020

Please sign in to comment.