Skip to content

Commit 392ac0c

Browse files
committed
Add Vishwaak to credits and apply some final minor tweaks to PR #3601
1 parent 2ab4b22 commit 392ac0c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

docs/Credits.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ Contributors
256256
[rezonant](https://github.com/rezonant),
257257
[fishfred](https://github.com/fishfred),
258258
[Snooober](https://github.com/Snooober),
259-
[costinvisan](https://github.com/costinvisan)
259+
[costinvisan](https://github.com/costinvisan),
260+
[Vishwaak](https://github.com/Vishwaak)
260261
* GUI Team:
261262
[Anton "small-jeeper" Kireev](https://github.com/small-jeeper),
262263
[miniME89](https://github.com/miniME89),

engine/src/main/java/org/terasology/rendering/nui/widgets/UIImage.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 MovingBlocks
2+
* Copyright 2019 MovingBlocks
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
1515
*/
1616
package org.terasology.rendering.nui.widgets;
1717

18-
1918
import org.terasology.math.geom.Vector2i;
2019
import org.terasology.rendering.assets.texture.TextureRegion;
2120
import org.terasology.rendering.nui.Canvas;
@@ -27,7 +26,7 @@
2726
import org.terasology.rendering.nui.databinding.DefaultBinding;
2827

2928
/**
30-
* A widget to display an image
29+
* A widget to display an image.
3130
*/
3231
public class UIImage extends CoreWidget {
3332
@LayoutConfig
@@ -68,8 +67,7 @@ public void onDraw(Canvas canvas) {
6867
ScaleMode scaleMode = canvas.getCurrentStyle().getTextureScaleMode();
6968

7069
if (image.get().getWidth() > (image.get().getHeight() * 2)) {
71-
72-
canvas.getCurrentStyle().setTextureScaleMode(ScaleMode.SCALE_FIT);
70+
canvas.getCurrentStyle().setTextureScaleMode(ScaleMode.STRETCH);
7371
} else {
7472
canvas.getCurrentStyle().setTextureScaleMode(ScaleMode.SCALE_FILL);
7573
}
@@ -124,5 +122,4 @@ public void setTint(Color color) {
124122
public void bindTint(Binding<Color> binding) {
125123
this.tint = binding;
126124
}
127-
128125
}

0 commit comments

Comments
 (0)