From 33e6d7b107a685e02854707f1bd6df85860fead0 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Sun, 27 Jan 2019 11:11:29 +0300 Subject: [PATCH] kek --- Applications/Finder.app/Icon.pic | Bin 155 -> 155 bytes Applications/Picture Edit.app/Main.lua | 2 +- Libraries/System.lua | 31 +++++++++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Applications/Finder.app/Icon.pic b/Applications/Finder.app/Icon.pic index 4389226ed1d4cb970840d36a37b2c8b2fd56415e..a71d1b25fc0a9b5db55f5ced87261d108607b426 100644 GIT binary patch delta 69 zcmbQuIGb^Ts^HYEOq&@Q7?~KE{(~v@i551RQyQ3JfIJpvW)@bEFbgBwqp9l|Ax!p1 LQ#UYzr5Tw39CHqm delta 52 zcmbQuIGb^T>ck@9iDowHQ#UZiFfuT*Ffu)wx}Nbrn92TV>Q<)BKqeC-6G()KksSbz CQ4Ih9 diff --git a/Applications/Picture Edit.app/Main.lua b/Applications/Picture Edit.app/Main.lua index c99234ea..3467daeb 100644 --- a/Applications/Picture Edit.app/Main.lua +++ b/Applications/Picture Edit.app/Main.lua @@ -485,7 +485,7 @@ local fileItemSubMenu = fileItem:addSubMenuItem("Open recent", #config.recentFil for i = 1, #config.recentFiles do fileItemSubMenu:addItem(text.limit(config.recentFiles[i], 32, "left")).onTouch = function() loadImage(config.recentFiles[i]) - + window.image.reposition() workspace:draw() end diff --git a/Libraries/System.lua b/Libraries/System.lua index 61d592af..047d94f4 100755 --- a/Libraries/System.lua +++ b/Libraries/System.lua @@ -1486,7 +1486,7 @@ local function setWorkspaceHidden(state) local child for i = 1, #workspace.children do child = workspace.children[i] - if child ~= desktopWindowsContainer and child ~= desktopMenu then + if child ~= desktopWindowsContainer and child ~= desktopMenu and child ~= desktopMenuLayout then child.hidden = state end end @@ -1518,7 +1518,7 @@ local function windowRemove(window) if not window.dockIcon.keepInDock then window.dockIcon:remove() - dockContainer.update() + dockContainer.sort() end end end @@ -1892,7 +1892,7 @@ function system.execute(path, ...) end local function desktopBackgroundAmbientDraw() - screen.drawRectangle(1, 1, desktopBackground.width, desktopBackground.height, desktopBackgroundColor, 0, " ") + screen.drawRectangle(1, 2, desktopBackground.width, desktopBackground.height, desktopBackgroundColor, 0, " ") end function system.updateWallpaper() @@ -1983,13 +1983,13 @@ function system.updateResolution() desktopWindowsContainer.width, desktopWindowsContainer.height = workspace.width, workspace.height - 1 - dockContainer.update() + dockContainer.sort() dockContainer.localY = workspace.height - dockContainer.height + 1 end local function moveDockIcon(index, direction) dockContainer.children[index], dockContainer.children[index + direction] = dockContainer.children[index + direction], dockContainer.children[index] - dockContainer.update() + dockContainer.sort() dockContainer.saveUserSettings() workspace:draw() end @@ -2058,15 +2058,9 @@ function system.updateDesktop() system.saveUserSettings() end - dockContainer.update = function() + dockContainer.sort = function() local x = 4 for i = 1, #dockContainer.children do - -- Not trash - if i < #dockContainer.children then - dockContainer.children[i]:analyseExtension(iconLaunchers) - end - - -- Sorting dockContainer.children[i].localX = x x = x + userSettings.iconWidth + userSettings.iconHorizontalSpace end @@ -2075,6 +2069,12 @@ function system.updateDesktop() dockContainer.localX = math.floor(workspace.width / 2 - dockContainer.width / 2) end + dockContainer.updateIcons = function() + for i = 1, #dockContainer.children - 1 do + dockContainer.children[i]:analyseExtension(iconLaunchers) + end + end + dockContainer.addIcon = function(path) local icon = dockContainer:addChild(system.icon(1, 2, path, 0x2D2D2D, 0xFFFFFF)) icon:analyseExtension(iconLaunchers) @@ -2147,7 +2147,7 @@ function system.updateDesktop() icon.keepInDock = nil else icon:remove() - dockContainer.update() + dockContainer.sort() end workspace:draw() @@ -2166,7 +2166,7 @@ function system.updateDesktop() workspace:draw() end - dockContainer.update() + dockContainer.sort() return icon end @@ -2381,7 +2381,8 @@ function system.updateDesktop() elseif e1 == "system" then if e2 == "updateFileList" then desktopIconField:updateFileList() - dockContainer.update() + dockContainer.sort() + dockContainer.updateIcons() workspace:draw() end elseif e1 == "network" then