Skip to content

Commit ef0251e

Browse files
committed
Fix translation
1 parent 9606794 commit ef0251e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

background/Background.vala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ public interface Gala.Background.Background : Object, Gdk.Paintable {
130130
return Utils.get_background_color_information (texture, height);
131131
}
132132

133-
public override double get_intrinsic_aspect_ratio () {
134-
return texture.get_intrinsic_aspect_ratio ();
135-
}
136-
137133
public void snapshot (Gdk.Snapshot gdk_snapshot, double width, double height) {
138134
var snapshot = (Gtk.Snapshot) gdk_snapshot;
139135

@@ -142,11 +138,11 @@ public interface Gala.Background.Background : Object, Gdk.Paintable {
142138
var x_scale = (float) width / texture.get_width ();
143139
var y_scale = (float) height / texture.get_height ();
144140
if (x_scale > y_scale) {
141+
snapshot.translate ({0, (float) (height - texture.get_height () * x_scale) / 2});
145142
snapshot.scale (x_scale, x_scale);
146-
snapshot.translate ({0, (float) (height - texture.get_height () * y_scale) / 2});
147143
} else {
144+
snapshot.translate ({(float) (width - (texture.get_width () * y_scale)) / 2, 0});
148145
snapshot.scale (y_scale, y_scale);
149-
snapshot.translate ({(float) (width - texture.get_width () * x_scale) / 2, 0});
150146
}
151147
texture.snapshot (snapshot, texture.get_width (), texture.get_height ());
152148
break;

0 commit comments

Comments
 (0)