Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Fix build errors + Show description when name is unset (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
luk1337 authored Feb 14, 2021
1 parent 4d6c49a commit 42d5e4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion .ts-for-girrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ module.exports = {
'/usr/lib64/mutter-6'
],
outdir: './@types',
ignore: ["Gio-2.0"]
}
11 changes: 8 additions & 3 deletions src/applicationStreamSlider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ export var ApplicationStreamSlider = class extends Volume.StreamSlider {
this.stream = stream;
this._icon.icon_name = stream.get_icon_name();

if (stream.get_name()) {
this._vbox = new BoxLayout({ vertical: true });
let name = stream.get_name();
let description = stream.get_description();

this._label = new Label({ text: showDesc ? `${stream.get_name()} - ${stream.get_description()}` : stream.get_name() });
if (name || description) {
this._vbox = new BoxLayout()
this._vbox.vertical = true;

this._label = new Label();
this._label.text = name && showDesc ? `${name} - ${description}` : (name || description);
this._vbox.add(this._label);

this.item.remove_child(this._slider);
Expand Down

0 comments on commit 42d5e4b

Please sign in to comment.