Commit f3f9c330 authored by Andrés G. Aragoneses's avatar Andrés G. Aragoneses

ThickClient: workaround for invisible (instead of bold) text (bgo#732838)

After several hours attempting to find a reduced testcase for this
problem (which appears to be somewhere deeper in the stack: pango,
cairo, or gtk), I've found this harmless workaround that actually
makes the first line of text (in TrackInfoDisplay class) be more
consistent with the second line of text (the latter already wrapped
other markup elements with a wider <span> element using the default
text colour).

The TextColor and BackgroundColor properties seem to have wrong
values though (both black, rgb#000000), compared to the stable
branch (GTK2), but that will be tracked in a different bug, because
it is unrelated to this issue.
parent 1e6509ec
......@@ -28,7 +28,6 @@
//
using System;
using System.Collections.Generic;
using Mono.Unix;
using Gtk;
......@@ -38,7 +37,6 @@ using Hyena;
using Hyena.Gui;
using Hyena.Gui.Theatrics;
using Banshee.Base;
using Banshee.Collection;
using Banshee.Collection.Gui;
using Banshee.ServiceStack;
......@@ -505,7 +503,7 @@ namespace Banshee.Gui.Widgets
protected virtual string GetFirstLineText (TrackInfo track)
{
return String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (track.DisplayTrackTitle));
return WrapWithDefaultTextColor (String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (track.DisplayTrackTitle)));
}
protected virtual string GetSecondLineText (TrackInfo track)
......@@ -542,6 +540,11 @@ namespace Banshee.Gui.Widgets
markup = GetByFrom (track.ArtistName, track.DisplayArtistName, track.AlbumTitle, track.DisplayAlbumTitle, true);
}
return WrapWithDefaultTextColor (markup);
}
private string WrapWithDefaultTextColor (string markup)
{
return String.Format ("<span color=\"{0}\">{1}</span>",
CairoExtensions.ColorGetHex (TextColor, false),
markup);
......@@ -563,7 +566,6 @@ namespace Banshee.Gui.Widgets
private string GetByFrom (string artist, string display_artist, string album, string display_album, bool unknown_ok)
{
bool has_artist = !String.IsNullOrEmpty (artist);
bool has_album = !String.IsNullOrEmpty (album);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment