public FriendBox(Friend friend, WebService web_service) : base() { this.friend = friend; Gdk.Pixbuf pic = web_service.LoadImage (friend.Image); this.Image.Pixbuf = pic.ScaleSimple (45, 45, Gdk.InterpType.Bilinear); Label username = new Label (); username.Markup = "<b>" + Utils.ParseMarkup (friend.Username) + "</b>"; this.InformationBox.Add (username); }
public TopAlbumBox(TopAlbum album, WebService web_service, int rank) : base() { this.album = album; Gdk.Pixbuf pic = web_service.LoadImage (album.Image); this.Image.Pixbuf = pic.ScaleSimple (45, 45, Gdk.InterpType.Bilinear); Label name = new Label (); VBox info_box = new VBox (false, 5); name.Markup = rank + ". " + Utils.ParseMarkup (album.Name); name.Ellipsize = Pango.EllipsizeMode.End; name.Xalign = 0; info_box.PackStart (name, false, false, 0); this.InformationBox.Add (info_box); }
public TopArtistBox(TopArtist artist, WebService web_service) : base() { this.artist = artist; this.Image.Pixbuf = web_service.LoadImage (artist.Image); Label name = new Label (); Label playcount = new Label (); name.Markup = "<b>" + Utils.ParseMarkup (artist.Name) + "</b>"; playcount.Markup = "<small>Play Count: " + artist.PlayCount + "</small>"; name.Xalign = 0; playcount.Xalign = 0; VBox box = new VBox (false, 2); box.PackStart (name, false, false, 0); box.PackStart (playcount, false, false, 0); this.InformationBox.Add (box); }
public SimilarArtistBox(SimilarArtist artist, WebService web_service) : base() { this.artist = artist; this.Image.Pixbuf = web_service.LoadImage (artist.Image); Label name = new Label (); Label match = new Label (); VBox info_box = new VBox (false, 5); name.Markup = "<b>" + Utils.ParseMarkup (artist.Name) + "</b>"; match.Markup = "<small>Similarity: <b>% " + artist.Match + "</b></small>"; name.Xalign = 0; match.Xalign = 0; info_box.PackStart (name, false, false, 0); info_box.PackStart (match, false, false, 0); this.InformationBox.Add (info_box); }