Skip to content

Commit

Permalink
Device: Fix bold device names (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored and cassidyjames committed Dec 6, 2018
1 parent 0fbc664 commit 9a0d3b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file modified data/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion src/Widgets/Device.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,24 @@ public class BluetoothIndicator.Widgets.Device : Wingpanel.Widgets.Container {
construct {
name_label = new Gtk.Label ("<b>%s</b>".printf (device.name));
name_label.halign = Gtk.Align.START;
name_label.valign = Gtk.Align.END;
name_label.vexpand = true;
name_label.use_markup = true;

status_label = new Gtk.Label (_("Not Connected"));
status_label.halign = Gtk.Align.START;
status_label.valign = Gtk.Align.START;
status_label.vexpand = true;

spinner = new Gtk.Spinner ();
spinner.halign = Gtk.Align.START;
spinner.valign = Gtk.Align.START;
spinner.hexpand = true;

var size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.VERTICAL);
size_group.add_widget (status_label);
size_group.add_widget (spinner);

icon_image = new Gtk.Image.from_icon_name (device.icon == null ? DEFAULT_ICON : device.icon, Gtk.IconSize.DIALOG);

var grid = new Gtk.Grid ();
Expand Down Expand Up @@ -81,7 +90,7 @@ public class BluetoothIndicator.Widgets.Device : Wingpanel.Widgets.Container {
}

private void update_status () {
name_label.label = device.name;
name_label.label = "<b>%s</b>".printf (device.name);

if (device.connected) {
status_label.label = _("Connected");
Expand Down

0 comments on commit 9a0d3b9

Please sign in to comment.