Actually scale the minimap background instead of setting size

This commit is contained in:
Tor Hedin Brønner
2017-10-18 09:24:30 +02:00
parent 2af91c789d
commit aca9d73c47
+3 -2
View File
@@ -352,8 +352,9 @@ MultiMap = new Lang.Class({
chrome.set_size(wrapper.width + 2*4, wrapper.height + 4);
chrome.set_position(-4, -4);
chrome.set_style('border: 4px #454f52; border-radius: 6px;');
background.first_child.width = wrapper.width;
background.first_child.height = wrapper.height;
let backgroundScaleX = wrapper.width/background.width;
let backgroundScaleY = wrapper.height/background.height;
background.set_scale(backgroundScaleX, backgroundScaleY);
minimap.actor.set_position(10, 8);
this.minimaps.push(minimap);
},