1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Show 24px file icon for low DPI screen

This commit is contained in:
Daniel Pan
2016-03-04 16:40:45 +08:00
parent f04e152e41
commit 24e2870831
3 changed files with 22 additions and 4 deletions

View File

@@ -212,10 +212,27 @@ define([
},
getDirIconUrl: function(is_readonly, size) {
if (is_readonly) {
return app.config.mediaUrl + "img/folder-read-only-192.png";
if (size > 24) {
if (is_readonly) {
return app.config.mediaUrl + "img/folder-read-only-192.png";
} else {
return app.config.mediaUrl + "img/folder-192.png";
}
} else {
return app.config.mediaUrl + "img/folder-beige-192.png";
if (is_readonly) {
return app.config.mediaUrl + "img/folder-read-only-24.png";
} else {
return app.config.mediaUrl + "img/folder-24.png";
}
}
},
isHiDPI: function() {
var pixelRatio = window.devicePixelRatio ? window.devicePixelRatio : 1;
if (pixelRatio > 1) {
return true;
} else {
return false;
}
},