Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Porter <slug@qwebirc.org>2010-06-06 17:27:09 (GMT)
committer Chris Porter <slug@qwebirc.org>2010-06-06 17:27:09 (GMT)
commit33077e803b36925df1a72e046f1a623cd53986bb (patch)
tree42baacc7d8d77770a7b2c7c0a09364d05995e101
parent2704a7e831e6cb54c82b9e1fe55162e18a6ac994 (diff)
Fix tab wrapping when there are many tabs.
-rw-r--r--css/qui.mcss14
-rw-r--r--js/ui/frontends/qui.js14
2 files changed, 15 insertions, 13 deletions
diff --git a/css/qui.mcss b/css/qui.mcss
index 539ab8d..8a6566b 100644
--- a/css/qui.mcss
+++ b/css/qui.mcss
@@ -119,25 +119,23 @@ html {
.qwebirc-qui .outertabbar {
border-bottom: 1px solid $(tabbar_border);
background: $(tabbar_background);
- white-space: nowrap;
}
.qwebirc-qui .tabbar {
- padding: 4px;
font-size: 0.8em;
color: $(tabbar_text);
+ margin-left: 38px;
+ line-height: 24px;
}
.qwebirc-qui a.tab {
border: 1px solid $(tab_border);
padding: 2px;
cursor: default;
- margin-right: 2px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-}
-
-.qwebirc-qui a.tab {
+ margin-right: -2px;
+ white-space: nowrap;
text-decoration: none;
color: $(tab_text);
}
@@ -165,7 +163,8 @@ html {
.qwebirc-qui .tabclose {
margin-left: 5px;
- font-size: 0.6em;
+ font-size: 0.7em;
+ line-height: 150%;
vertical-align: top;
padding-left: 3px;
-moz-border-radius: 2px;
@@ -247,6 +246,7 @@ div#noscript {
cursor: hand;
float: left;
padding: 4px;
+ width: 30px;
}
.qwebirc-qui .dropdownmenu {
diff --git a/js/ui/frontends/qui.js b/js/ui/frontends/qui.js
index e9dc786..a8ac001 100644
--- a/js/ui/frontends/qui.js
+++ b/js/ui/frontends/qui.js
@@ -354,8 +354,10 @@ qwebirc.ui.QUI.Window = new Class({
this.tab = new Element("a", {"href": "#"});
this.tab.addClass("tab");
this.tab.addEvent("focus", function() { this.blur() }.bind(this.tab));;
-
+
+ this.spaceNode = document.createTextNode(" ");
parentObject.tabs.appendChild(this.tab);
+ parentObject.tabs.appendChild(this.spaceNode);
this.tab.appendText(name);
this.tab.addEvent("click", function(e) {
@@ -426,13 +428,11 @@ qwebirc.ui.QUI.Window = new Class({
this.parentObject.qjsui.applyClasses("nicklist", this.nicklist);
}
- if(type == qwebirc.ui.WINDOW_CHANNEL) {
+ if(type == qwebirc.ui.WINDOW_CHANNEL)
this.updateTopic("");
- } else {
- this.reflow();
- }
-
+
this.nicksColoured = this.parentObject.uiOptions.NICK_COLOURS;
+ this.reflow();
},
editTopic: function() {
if(!this.client.nickOnChanHasPrefix(this.client.nickname, this.name, "@")) {
@@ -619,6 +619,8 @@ qwebirc.ui.QUI.Window = new Class({
this.parent();
this.parentObject.tabs.removeChild(this.tab);
+ this.parentObject.tabs.removeChild(this.spaceNode);
+ this.reflow();
},
addLine: function(type, line, colourClass) {
var e = new Element("div");