]> jfr.im git - irc/rizon/qchat.git/commitdiff
fix blank page on setting some text colour options
authorChris Porter <redacted>
Sun, 24 Aug 2014 22:44:47 +0000 (23:44 +0100)
committerChris Porter <redacted>
Sun, 24 Aug 2014 22:44:47 +0000 (23:44 +0100)
js/ui/baseui.js

index 34623fbf786470545db29907b07f6fa7ce8c33f3..0d9ec12488ac0046251a4502727b11e5957c956f 100644 (file)
@@ -219,14 +219,13 @@ qwebirc.ui.StandardUI = new Class({
     this.uiOptions = new qwebirc.ui.DefaultOptionsClass(this, options.uiOptionsArg);
     this.customWindows = new QHash();
     
-    this.__styleValues = {hue: this.uiOptions.STYLE_HUE, saturation: 0, lightness: 0};
+    this.__styleValues = {hue: this.uiOptions.STYLE_HUE, saturation: 0, lightness: 0, textHue: this.uiOptions.STYLE_HUE, textSaturation: 0, textLightness: 0};
     if($defined(this.options.hue)) this.__styleValues.hue = this.options.hue;
     if($defined(this.options.saturation)) this.__styleValues.saturation = this.options.saturation;
     if($defined(this.options.lightness)) this.__styleValues.lightness = this.options.lightness;
-
-    if(this.options.thue !== null) this.__styleValues.textHue = this.options.thue;
-    if(this.options.tsaturation !== null) this.__styleValues.textSaturation = this.options.tsaturation;
-    if(this.options.tlightness !== null) this.__styleValues.textLightness = this.options.tlightness;
+    if($defined(this.options.thue)) this.__styleValues.textHue = this.options.thue;
+    if($defined(this.options.tsaturation)) this.__styleValues.textSaturation = this.options.tsaturation;
+    if($defined(this.options.tlightness)) this.__styleValues.textLightness = this.options.tlightness;
     
     document.addEvent("keydown", this.__handleHotkey.bind(this));
   },