mirror of https://github.com/1099438829/macUI.git
小框模式下图标按照横向排列
This commit is contained in:
parent
d529a4d69b
commit
f37c9994da
|
|
@ -345,6 +345,7 @@ body {
|
||||||
|
|
||||||
#win10 #win10-shortcuts {
|
#win10 #win10-shortcuts {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
||||||
24
js/mac.js
24
js/mac.js
|
|
@ -778,7 +778,11 @@ window.Win10 = {
|
||||||
$("#win10-msg-nof").removeClass('on-new-msg fa-commenting-o');
|
$("#win10-msg-nof").removeClass('on-new-msg fa-commenting-o');
|
||||||
},
|
},
|
||||||
renderShortcuts:function () {
|
renderShortcuts:function () {
|
||||||
var h=parseInt(($("#win10 #win10-shortcuts")[0].offsetHeight-85)/100);
|
if(!this.isSmallScreen()){
|
||||||
|
//大屏执行pc的布局也就是竖排,小屏幕执行移动端也就是横向排列
|
||||||
|
var h=parseInt(($("#win10 #win10-shortcuts")[0].offsetHeight-90)/100);
|
||||||
|
console.log(h)
|
||||||
|
//计算一列最大几个图标,公式是(桌面图标界面的大小 - 顶部状态栏和底部dock栏的尺寸)/单个图标高度所占的尺寸
|
||||||
var x=0,y=0;
|
var x=0,y=0;
|
||||||
$("#win10 #win10-shortcuts .shortcut").each(function () {
|
$("#win10 #win10-shortcuts .shortcut").each(function () {
|
||||||
$(this).css({
|
$(this).css({
|
||||||
|
|
@ -791,6 +795,22 @@ window.Win10 = {
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
//小屏幕执行横屏
|
||||||
|
var w=parseInt(($("#win10 #win10-shortcuts")[0].offsetWidth-10)/82);
|
||||||
|
var x=0,y=0;
|
||||||
|
$("#win10 #win10-shortcuts .shortcut").each(function () {
|
||||||
|
$(this).css({
|
||||||
|
left:x*82+10,
|
||||||
|
top:y*100+10,
|
||||||
|
});
|
||||||
|
x++;
|
||||||
|
if(x>=w){
|
||||||
|
x=0;
|
||||||
|
y++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//渲染DOCK
|
//渲染DOCK
|
||||||
renderDocks:function () {
|
renderDocks:function () {
|
||||||
|
|
@ -805,7 +825,7 @@ window.Win10 = {
|
||||||
docks.eq(i).css('display','list-item');
|
docks.eq(i).css('display','list-item');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(width>768){
|
if(!this.isSmallScreen()){
|
||||||
$("#footer .dock li a img").hover(
|
$("#footer .dock li a img").hover(
|
||||||
function(){
|
function(){
|
||||||
$(this).parent('a').prev().css('display','flex');
|
$(this).parent('a').prev().css('display','flex');
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue