~ubuntu-branches/ubuntu/trusty/banshee/trusty-updates

« back to all changes in this revision

Viewing changes to src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/LargeTrackInfoDisplay.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-02-09 23:06:03 UTC
  • mfrom: (1.2.26) (150.1.2 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140209230603-7dhbveo058j96ea0
* [fbf05ca] Imported Upstream version 2.9.0+really2.6.1:
  Downgrade to 2.6.1 -- 2.9.x is unstable and 3.0 won't arrive in time for
  release
* [22de440] Revert packaging to 2.6.1-2ubuntu1
* [7357b73] Merge changes from 2.6.1-5
* [a7156c0] Filter out libgpod-cil-dev versions built against gtk#3
* [e7c634d] Update dversionmangle for extracting +really version out

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
            }
130
130
 
131
131
            cr.Rectangle (x, y, asr, alloc.Height);
132
 
            cr.SetSourceColor (BackgroundColor);
 
132
            cr.Color = BackgroundColor;
133
133
            cr.Fill ();
134
134
 
135
135
            x += (asr - surface_w) / 2;
141
141
 
142
142
        private Surface CreateScene (Cairo.Context window_cr, ImageSurface image, int reflect)
143
143
        {
144
 
            var target = window_cr.GetTarget ();
145
 
            Surface surface = target.CreateSimilar (target.Content,
 
144
            Surface surface = window_cr.Target.CreateSimilar (window_cr.Target.Content,
146
145
                image.Width, image.Height + reflect);
147
 
            using (var cr = new Context (surface)) {
148
 
 
149
 
                cr.Save ();
150
 
 
151
 
                cr.SetSource (image);
152
 
                cr.Paint ();
153
 
 
154
 
                cr.Rectangle (0, image.Height, image.Width, reflect);
155
 
                cr.Clip ();
156
 
 
157
 
                Matrix matrix = new Matrix ();
158
 
                matrix.InitScale (1, -1);
159
 
                matrix.Translate (0, -(2 * image.Height) + 1);
160
 
                cr.Transform (matrix);
161
 
 
162
 
                cr.SetSource (image);
163
 
                cr.Paint ();
164
 
 
165
 
                cr.Restore ();
166
 
 
167
 
                Color bg_transparent = BackgroundColor;
168
 
                bg_transparent.A = 0.65;
169
 
 
170
 
                using (var mask = new LinearGradient (0, image.Height, 0, image.Height + reflect)) {
171
 
                    mask.AddColorStop (0, bg_transparent);
172
 
                    mask.AddColorStop (1, BackgroundColor);
173
 
 
174
 
                    cr.Rectangle (0, image.Height, image.Width, reflect);
175
 
                    cr.SetSource (mask);
176
 
                    cr.Fill ();
177
 
                }
178
 
 
179
 
            }
 
146
            Cairo.Context cr = new Context (surface);
 
147
 
 
148
            cr.Save ();
 
149
 
 
150
            cr.SetSource (image);
 
151
            cr.Paint ();
 
152
 
 
153
            cr.Rectangle (0, image.Height, image.Width, reflect);
 
154
            cr.Clip ();
 
155
 
 
156
            Matrix matrix = new Matrix ();
 
157
            matrix.InitScale (1, -1);
 
158
            matrix.Translate (0, -(2 * image.Height) + 1);
 
159
            cr.Transform (matrix);
 
160
 
 
161
            cr.SetSource (image);
 
162
            cr.Paint ();
 
163
 
 
164
            cr.Restore ();
 
165
 
 
166
            Color bg_transparent = BackgroundColor;
 
167
            bg_transparent.A = 0.65;
 
168
 
 
169
            LinearGradient mask = new LinearGradient (0, image.Height, 0, image.Height + reflect);
 
170
            mask.AddColorStop (0, bg_transparent);
 
171
            mask.AddColorStop (1, BackgroundColor);
 
172
 
 
173
            cr.Rectangle (0, image.Height, image.Width, reflect);
 
174
            cr.Pattern = mask;
 
175
            cr.Fill ();
 
176
 
 
177
            ((IDisposable)cr).Dispose ();
180
178
            return surface;
181
179
        }
182
180
 
256
254
 
257
255
            if (render_track) {
258
256
                cr.MoveTo (track_info_alloc.X, track_info_alloc.Y);
259
 
                cr.SetSourceColor (TextColor);
 
257
                cr.Color = TextColor;
260
258
                PangoCairoHelper.ShowLayout (cr, first_line_layout);
261
259
 
262
260
                RenderTrackRating (cr, track);