Add icon row arrangement and consistent sizing
This commit is contained in:
1 parent
f79e30897b
commit
8d604a5807
9 files changed
+213
-67
No files matched your search
@@ -389,7 +389,7 @@ function newState() {
|
||||
}
|
||||
|
||||
function demoItems() {
|
||||
const pad = 108, colW = 216, icon = 132, ih = 168;
|
||||
const pad = 108, colW = 216, icon = 148, ih = 184;
|
||||
const colX = c => pad + c * colW + (colW - icon) / 2;
|
||||
const out = [];
|
||||
out.push({ id:'w_clock', type:'widget', x:pad, y:196, w:864, h:320, z:1,
|
||||
@@ -397,7 +397,7 @@ function demoItems() {
|
||||
|
||||
[['微信','com.tencent.mm'],['相机','com.android.camera2'],['相册','com.android.gallery3d'],['设置','com.android.settings'],['浏览器','com.android.chrome'],['QQ音乐','com.tencent.qqmusic'],['电话','com.android.dialer'],['日历','com.android.calendar']].forEach(([label, pkg], i) => {
|
||||
const c = i % 4, r = Math.floor(i / 4);
|
||||
out.push({ id:'i'+i, type:'app_icon', x:colX(c), y:604 + r*224, w:icon, h:ih, z:2,
|
||||
out.push({ id:'i'+i, type:'app_icon', x:colX(c), y:596 + r*224, w:icon, h:ih, z:2,
|
||||
payload:{ package:pkg, label } });
|
||||
});
|
||||
|
||||
@@ -407,7 +407,7 @@ function demoItems() {
|
||||
payload:{ provider:'com.tencent.qqmusic/com.tencent.qqmusiccommon.WidgetProviderSmall', label:'音乐' } });
|
||||
|
||||
[['联系人','com.android.contacts'],['短信','com.android.messaging'],['文件','com.android.documentsui'],['QQ','com.tencent.mobileqq']].forEach(([label, pkg], i) => {
|
||||
out.push({ id:'s'+i, type:'app_icon', x:colX(i), y:1650, w:icon, h:ih, z:2,
|
||||
out.push({ id:'s'+i, type:'app_icon', x:colX(i), y:1642, w:icon, h:ih, z:2,
|
||||
payload:{ package:pkg, label } });
|
||||
});
|
||||
return out;
|
||||
|
||||
Reference in new issue
Block a user