diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index 32a6df727..09033cfc2 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -1664,20 +1664,6 @@ StScrollBar { border: none; } } - .summary-source-counter { - font-size: 10pt; - font-weight: bold; - height: 1.6em; width: 1.6em; - -shell-counter-overlap-x: 3px; - -shell-counter-overlap-y: 3px; - background-color: $selected_bg_color; - color: $selected_fg_color; - border: 2px solid $fg_color; - box-shadow: 0 2px 2px rgba(0,0,0,0.5); - border-radius: 0.9em; // should be 0.8 but whatever; wish I could do 50%; - } - - .secondary-icon { icon-size: 1.09em; } //chat bubbles .chat-body { spacing: 5px; } diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f1f79d8c2..512a44a33 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -616,77 +616,6 @@ class SourceActor extends St.Widget { } }); -var SourceActorWithLabel = GObject.registerClass( -class SourceActorWithLabel extends SourceActor { - _init(source, size) { - super._init(source, size); - - this._counterLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER, - x_expand: true, - y_align: Clutter.ActorAlign.CENTER, - y_expand: true }); - - this._counterBin = new St.Bin({ style_class: 'summary-source-counter', - child: this._counterLabel, - layout_manager: new Clutter.BinLayout() }); - this._counterBin.hide(); - - this._counterBin.connect('style-changed', () => { - let themeNode = this._counterBin.get_theme_node(); - this._counterBin.translation_x = themeNode.get_length('-shell-counter-overlap-x'); - this._counterBin.translation_y = themeNode.get_length('-shell-counter-overlap-y'); - }); - - this.add_actor(this._counterBin); - - this._countUpdatedId = this._source.connect('count-updated', this._updateCount.bind(this)); - this._updateCount(); - - this.connect('destroy', () => { - this._source.disconnect(this._countUpdatedId); - }); - } - - vfunc_allocate(box, flags) { - super.vfunc_allocate(box, flags); - - let childBox = new Clutter.ActorBox(); - - let [minWidth, minHeight, naturalWidth, naturalHeight] = this._counterBin.get_preferred_size(); - let direction = this.get_text_direction(); - - if (direction == Clutter.TextDirection.LTR) { - // allocate on the right in LTR - childBox.x1 = box.x2 - naturalWidth; - childBox.x2 = box.x2; - } else { - // allocate on the left in RTL - childBox.x1 = 0; - childBox.x2 = naturalWidth; - } - - childBox.y1 = box.y2 - naturalHeight; - childBox.y2 = box.y2; - - this._counterBin.allocate(childBox, flags); - } - - _updateCount() { - if (this._actorDestroyed) - return; - - this._counterBin.visible = this._source.countVisible; - - let text; - if (this._source.count < 100) - text = this._source.count.toString(); - else - text = String.fromCharCode(0x22EF); // midline horizontal ellipsis - - this._counterLabel.set_text(text); - } -}); - var Source = class Source { constructor(title, iconName) { this.SOURCE_ICON_SIZE = 48;