Skip to content

Commit

Permalink
Add tab audo indicators
Browse files Browse the repository at this point in the history
  • Loading branch information
Lootyhoof committed Nov 24, 2018
1 parent a0f0dd6 commit 7c77f92
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 0 deletions.
101 changes: 101 additions & 0 deletions src/chrome/browser/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -2573,6 +2573,107 @@ tabpanels {
padding: 0px 2px 0px 2px !important;
}

/* ::::: tab sound indicator ::::: */

.tab-icon-sound {
margin-inline-start: 2px;
margin-inline-end: 2px;
width: 16px;
height: 16px;
padding: 0;
}

.allTabs-endimage[soundplaying],
.allTabs-endimage[muted],
.allTabs-endimage[blocked],
.tab-icon-sound[soundplaying],
.tab-icon-sound[muted],
.tab-icon-sound[blocked] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio");
filter: url(chrome://browser/skin/filters.svg#fill);
fill: currentColor;
}

.allTabs-endimage[muted],
.tab-icon-sound[muted] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-muted");
}

.allTabs-endimage[blocked],
.tab-icon-sound[blocked] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked");
}

.tab-icon-sound:-moz-lwtheme-darktext[soundplaying],
.tab-icon-sound:-moz-lwtheme-darktext[muted],
.tab-icon-sound:-moz-lwtheme-darktext[blocked] {
filter: url(chrome://browser/skin/filters.svg#fill) drop-shadow(1px 1px 1px white);
}

.tab-icon-sound:-moz-lwtheme-brighttext[soundplaying],
.tab-icon-sound:-moz-lwtheme-brighttext[muted],
.tab-icon-sound:-moz-lwtheme-brighttext[blocked] {
filter: url(chrome://browser/skin/filters.svg#fill) drop-shadow(1px 1px 1px black);
}

.tab-icon-sound[soundplaying]:not(:hover),
.tab-icon-sound[muted]:not(:hover),
.tab-icon-sound[blocked]:not(:hover) {
opacity: .8;
}

.tab-icon-sound[soundplaying-scheduledremoval]:not([muted]):not(:hover),
.tab-icon-overlay[soundplaying-scheduledremoval]:not([muted]):not(:hover) {
transition: opacity .3s linear var(--soundplaying-removal-delay);
opacity: 0;
}

/* tab icon overlay */
.tab-icon-overlay {
width: 16px;
height: 16px;
margin-top: -8px;
margin-inline-start: -15px;
margin-inline-end: -1px;
position: relative;
}

.tab-icon-overlay[soundplaying],
.tab-icon-overlay[muted]:not([crashed]),
.tab-icon-overlay[blocked]:not([crashed]) {
border-radius: 10px;
}

.tab-icon-overlay[soundplaying]:hover,
.tab-icon-overlay[muted]:not([crashed]):hover,
.tab-icon-overlay[blocked]:not([crashed]):hover {
background-color: white;
}

.tab-icon-overlay[soundplaying] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio");
}

.tab-icon-overlay[muted] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-muted");
}

.tab-icon-overlay[blocked] {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked");
}

.tab-icon-overlay[soundplaying]:-moz-lwtheme-brighttext:not(:hover) {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white");
}

.tab-icon-overlay[muted]:-moz-lwtheme-brighttext:not(:hover) {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted");
}

.tab-icon-overlay[blocked]:-moz-lwtheme-brighttext:not(:hover) {
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked");
}

/* ::::: tabbar scroll buttons ::::: */

.tabbrowser-arrowscrollbox > .scrollbutton-up,
Expand Down
9 changes: 9 additions & 0 deletions src/chrome/browser/filters.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions src/chrome/browser/tabbrowser/tab-audio-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions src/chrome/browser/tabbrowser/tab-audio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7c77f92

Please sign in to comment.