~a-j-buxton/lightdm-gtk-greeter/background-fixes

« back to all changes in this revision

Viewing changes to src/lightdm-gtk-greeter.c

  • Committer: Alistair Buxton
  • Date: 2013-11-23 22:24:37 UTC
  • Revision ID: a.j.buxton@gmail.com-20131123222437-yzb9bv5cth1b05ct
Indentation fixes only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1520
1520
            {
1521
1521
                p_width = gdk_pixbuf_get_width(bg);
1522
1522
                p_height = gdk_pixbuf_get_height(bg);
1523
 
                
 
1523
 
1524
1524
                scale = (double)monitor_geometry.width/p_width;
1525
1525
                height = p_height * scale;
1526
1526
                width = monitor_geometry.width;
1527
 
                
 
1527
 
1528
1528
                if (height < monitor_geometry.height)
1529
1529
                {
1530
1530
                    scale = (double)monitor_geometry.height/p_height;
1531
1531
                    height = monitor_geometry.height;
1532
1532
                    width = p_width * scale;
1533
1533
                }
1534
 
                
1535
 
                
 
1534
 
1536
1535
                GdkPixbuf *p = gdk_pixbuf_scale_simple (bg, width,
1537
1536
                                                        height, GDK_INTERP_BILINEAR);
1538
1537
                if (width > monitor_geometry.width)
1539
1538
                {
1540
1539
                    p = gdk_pixbuf_new_subpixbuf(p, (width-monitor_geometry.width)/2, 0, monitor_geometry.width, monitor_geometry.height);
1541
1540
                }
1542
 
        if (!gdk_pixbuf_get_has_alpha (p))
1543
 
            p = gdk_pixbuf_add_alpha (p, FALSE, 255, 255, 255);
 
1541
                if (!gdk_pixbuf_get_has_alpha (p))
 
1542
                {
 
1543
                    p = gdk_pixbuf_add_alpha (p, FALSE, 255, 255, 255);
 
1544
                }
1544
1545
                gdk_cairo_set_source_pixbuf (c, p, monitor_geometry.x, monitor_geometry.y);
1545
1546
                g_object_unref (p);
1546
1547
            }