Bug 798753 - Visual polish for social provider user menu on OS X. r=jaws

--HG--
extra : rebase_source : 9ab7879b615fa30853661b1c5990eb54251ce41e
This commit is contained in:
Matthew Noorenberghe 2012-10-09 16:29:13 -07:00
parent 0755fd0e7b
commit 336579b2f7
6 changed files with 18 additions and 55 deletions

View File

@ -623,7 +623,7 @@ var SocialToolbar = {
if (profile.userName) { if (profile.userName) {
notLoggedInLabel.hidden = true; notLoggedInLabel.hidden = true;
userNameBtn.hidden = false; userNameBtn.hidden = false;
userNameBtn.label = profile.userName; userNameBtn.value = profile.userName;
} else { } else {
notLoggedInLabel.hidden = false; notLoggedInLabel.hidden = false;
userNameBtn.hidden = true; userNameBtn.hidden = true;

View File

@ -669,15 +669,18 @@
class="toolbarbutton-1" class="toolbarbutton-1"
type="menu"> type="menu">
<menupopup id="social-statusarea-popup"> <menupopup id="social-statusarea-popup">
<hbox id="social-statusarea-user" pack="start" align="center" <menuitem id="social-statusarea-user" pack="start" align="center" class="menuitem-iconic"
onclick="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();"> onclick="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
<image id="social-statusarea-user-portrait"/> <image id="social-statusarea-user-portrait"/>
<vbox> <vbox>
<button id="social-statusarea-notloggedin" <label id="social-statusarea-notloggedin"
class="link" label="&social.notLoggedIn.label;"/> value="&social.notLoggedIn.label;"/>
<button id="social-statusarea-username" class="link"/> <label id="social-statusarea-username"/>
</vbox> </vbox>
</hbox> </menuitem>
#ifndef XP_WIN
<menuseparator/>
#endif
<menuitem id="social-toggle-sidebar-menuitem" <menuitem id="social-toggle-sidebar-menuitem"
type="checkbox" type="checkbox"
autocheck="false" autocheck="false"

View File

@ -30,7 +30,7 @@ var tests = {
is(profile.portrait, portrait, "portrait is set"); is(profile.portrait, portrait, "portrait is set");
let userButton = document.getElementById("social-statusarea-username"); let userButton = document.getElementById("social-statusarea-username");
ok(!userButton.hidden, "username is visible"); ok(!userButton.hidden, "username is visible");
is(userButton.label, profile.userName, "username is set"); is(userButton.value, profile.userName, "username is set");
next(); next();
}, },
testAmbientNotifications: function(next) { testAmbientNotifications: function(next) {

View File

@ -2684,16 +2684,6 @@ html|*#gcli-output-frame {
margin-right: -12px; margin-right: -12px;
} }
#social-statusarea-user {
border-bottom: 1px solid rgb(221,221,221);
background-color: -moz-Dialog;
color: -moz-dialogtext;
position: relative;
font: message-box;
font-size: 12px;
cursor: pointer;
}
#social-statusarea-user-portrait { #social-statusarea-user-portrait {
width: 32px; width: 32px;
height: 32px; height: 32px;
@ -2701,19 +2691,6 @@ html|*#gcli-output-frame {
margin: 10px; margin: 10px;
} }
#social-statusarea-user > vbox > .link {
-moz-appearance: none;
background: transparent;
border: none;
color: -moz-nativehyperlinktext;
min-width: 0;
margin: 0 6px;
list-style-image: none;
}
#social-statusarea-user:hover > vbox > .link {
text-decoration: underline;
}
.social-panel > .panel-arrowcontainer > .panel-arrowcontent { .social-panel > .panel-arrowcontainer > .panel-arrowcontent {
padding: 0; padding: 0;
} }

View File

@ -4100,29 +4100,11 @@ html|*#gcli-output-frame {
/* === social toolbar provider menu === */ /* === social toolbar provider menu === */
#social-statusarea-user {
cursor: default;
font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
font-size: 12px;
cursor: pointer;
}
#social-statusarea-user-portrait { #social-statusarea-user-portrait {
width: 32px; width: 32px;
height: 32px; height: 32px;
margin: 10px; margin: 4px;
} -moz-margin-start: 0;
#social-statusarea-user > vbox > .link {
-moz-appearance: none;
color: -moz-nativehyperlinktext;
min-width: 0;
margin: 0 6px;
list-style-image: none;
}
#social-statusarea-user:hover > vbox > .link {
text-decoration: underline;
} }
.social-panel > .panel-arrowcontainer > .panel-arrowcontent { .social-panel > .panel-arrowcontainer > .panel-arrowcontent {

View File

@ -3361,12 +3361,10 @@ html|*#gcli-output-frame {
} }
#social-statusarea-user { #social-statusarea-user {
-moz-appearance: none;
border-bottom: 1px solid rgb(221,221,221); border-bottom: 1px solid rgb(221,221,221);
background-color: -moz-Dialog; background-color: -moz-Dialog;
color: -moz-dialogtext;
position: relative; position: relative;
font: message-box;
font-size: 12px;
cursor: pointer; cursor: pointer;
} }
@ -3377,7 +3375,8 @@ html|*#gcli-output-frame {
margin: 10px; margin: 10px;
} }
#social-statusarea-user > vbox > .link { #social-statusarea-user > vbox > #social-statusarea-notloggedin,
#social-statusarea-user > vbox > #social-statusarea-username {
-moz-appearance: none; -moz-appearance: none;
background: transparent; background: transparent;
border: none; border: none;
@ -3386,7 +3385,9 @@ html|*#gcli-output-frame {
margin: 0 6px; margin: 0 6px;
list-style-image: none; list-style-image: none;
} }
#social-statusarea-user:hover > vbox > .link {
#social-statusarea-user[_moz-menuactive] > vbox > #social-statusarea-notloggedin,
#social-statusarea-user[_moz-menuactive] > vbox > #social-statusarea-username {
text-decoration: underline; text-decoration: underline;
} }