Skip to content

Commit

Permalink
Fixes that applies ONLY for uncomposited window
Browse files Browse the repository at this point in the history
Toolbar button radius no longer applies to titlebar button
Improve menubar styling (no longer uses ugly text shadow)
Address the titlebar -> nav toolbar overlapping when toolbarizer addon is enabled (tradeoff: larger gap when app menu is available)
Titlebar border appearance improved

(these changes may not apply to other platform(s))
  • Loading branch information
fofajardo committed Apr 17, 2017
1 parent 449a451 commit 890e652
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 19 deletions.
38 changes: 27 additions & 11 deletions src/chrome/browser/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,16 @@
margin-top: 3px !important;
margin-bottom: 8px !important;
}

/* fix for small gap on tabs to top caption */
#navigator-toolbox[tabsontop=true] #tabbrowser-tabs {
margin-top: 6px;
}
/* nav. toolbox overlaps with window buttons
(when toolbarizer is enabled, tradeoff would be larger margin when appmenu is visible) */
#navigator-toolbox[tabsontop=false] {
padding-top: 11px;
}

#appmenu-button:hover:not(:active):not([open]) {
background-color: rgba(255,255,255,.3);
Expand All @@ -376,6 +386,19 @@
#main-window[privatebrowsingmode=temporary] #appmenu-button[open] {
background-color: rgb(158,2,255);
}

/* use diff. color for private browsing menu item */
#main-window[privatebrowsingmode=temporary] menubar > menu {
color: white;
}

#main-window[privatebrowsingmode=temporary] menubar > menu[_moz-menuactive="true"][open="true"] {
background: rgba(255, 255, 255, 0.2);
}

#main-window[privatebrowsingmode=temporary] menubar > menu[_moz-menuactive="true"]:not([disabled="true"]) {
background-color: rgba(255, 255, 255, 0.1);
}
}

.tab-drag-preview::before {
Expand Down Expand Up @@ -3230,6 +3253,7 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
}

#main-window[privatebrowsingmode=temporary] #navigator-toolbox[tabsontop=false] #TabsToolbar {
background-color: #505050;
box-shadow: 0 -1px 0 #5D5D5D inset, 0 -2px 0 rgba(0,0,0,.28) inset;
}

Expand All @@ -3238,10 +3262,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
background-color: #F1F1F1;
}

#main-window[privatebrowsingmode=temporary] #navigator-toolbox[tabsontop=false] #TabsToolbar {
background-color: #505050;
}

.tabbrowser-tab:not(:-moz-lwtheme) {
text-shadow: none;
}
Expand Down Expand Up @@ -3656,7 +3676,7 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
#main-window[sizemode=normal] #titlebar-content:not(:-moz-lwtheme),
#titlebar-content:not(:-moz-lwtheme) {
padding-bottom: 0;
box-shadow: 0 -1px 0 0 #ACB7C4, 0 -2px 0 0 #3E3F3F;
box-shadow: 0 -1px 0 0 #E3E3E3, 0 -2px 0 0 #3E3F3F;
}

#main-window:-moz-window-inactive {
Expand All @@ -3682,7 +3702,7 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
#main-window[privatebrowsingmode=temporary][sizemode=normal] #titlebar-content:not(:-moz-lwtheme),
#main-window[privatebrowsingmode=temporary] #titlebar-content:not(:-moz-lwtheme) {
background-color: #282B2D;
box-shadow: 0 -1px 0 0 #8699B3, 0 -2px 0 0 #3E3F3F;
box-shadow: 0 -1px 0 0 #505050, 0 -2px 0 0 #3E3F3F;
}

#main-window[privatebrowsingmode=temporary]:-moz-window-inactive,
Expand All @@ -3693,7 +3713,7 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
#main-window[privatebrowsingmode=temporary][sizemode=normal]:-moz-window-inactive #titlebar-content:not(:-moz-lwtheme),
#main-window[privatebrowsingmode=temporary]:-moz-window-inactive #titlebar-content:not(:-moz-lwtheme) {
background-color: #383B3D;
box-shadow: 0 -1px 0 0 #ACB7C4, 0 -2px 0 0 #3E3F3F;
box-shadow: 0 -1px 0 0 #505050, 0 -2px 0 0 #3E3F3F;
}

#toolbar-menubar:not(:-moz-lwtheme),
Expand All @@ -3715,10 +3735,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
margin-top: 7px !important;
margin-bottom: 0px !important;
}

#main-menubar {
text-shadow: 0px 0px 3px;
}
}

#toolbar-menubar:not([autohide=true]):not(:-moz-lwtheme),
Expand Down
12 changes: 6 additions & 6 deletions src/chrome/global/toolbarbutton.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ toolbarbutton {

toolbarbutton {
padding: 0 3px;
margin-top: 0px;
margin-bottom: 0px;
margin-top: 0px;
margin-bottom: 0px;
background: transparent;
background-clip: padding-box;
border: 1px solid;
Expand All @@ -31,6 +31,10 @@ toolbarbutton {
transition-duration: 500ms;
}

toolbarbutton:not(.titlebar-button) {
border-radius: 3px;
}

toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#PersonalToolbar):not(#addon-bar) toolbarbutton {
padding: 0 1px;
}
Expand Down Expand Up @@ -68,19 +72,15 @@ toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
}

toolbarbutton:not([open="true"]):not([checked="true"]):not([disabled="true"]):not(:active):hover {
/* border-image: url("chrome://global/skin/icons/browser_action_hot.png") 5 fill repeat stretch; */
border-image: none;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.1);
border-color: rgba(0, 0, 0, 0.1);
}

toolbarbutton:hover:active:not([disabled="true"]),
toolbarbutton[checked="true"]:not([disabled="true"]),
toolbarbutton[open="true"]:not([disabled="true"]) {
/* border-image: url("chrome://global/skin/icons/browser_action_pressed.png") 5 fill repeat stretch; */
border-image: none;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.2);
border-color: rgba(0, 0, 0, 0.2);
}
Expand Down
6 changes: 4 additions & 2 deletions src/chrome/os/winnt/menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ menuitem.menuitem-iconic > .menu-iconic-left,
/* ::::: menu/menuitems in menubar ::::: */

menubar > menu {
border-radius: 3px;
transition-property: background-color, border-color, box-shadow;
transition-duration: 500ms;
border: 2px solid transparent;
}

Expand All @@ -113,7 +116,7 @@ menubar > menu[_moz-menuactive="true"]:not([disabled="true"]) {
}

menubar > menu[_moz-menuactive="true"][open="true"] {
border-width: 3px 1px 1px 3px;
background: rgba(0, 0, 0, 0.2);
}

menubar > menu:-moz-lwtheme {
Expand All @@ -127,7 +130,6 @@ menubar > menu:-moz-lwtheme:not([disabled="true"]) {

menubar > menu:-moz-lwtheme[_moz-menuactive="true"]:not([disabled="true"]) {
background-color: rgba(0, 0, 0, 0.1);
color: Black !important;
text-shadow: none;
}

Expand Down

0 comments on commit 890e652

Please sign in to comment.