mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
Fixed icons positions when not using 'show file extensions' setting
This commit is contained in:
parent
f24efbd16d
commit
f6e7e70c4e
@ -974,7 +974,7 @@ local function iconFieldIconEventHandler(workspace, icon, e1, e2, e3, e4, e5, ..
|
|||||||
|
|
||||||
iconFieldSaveIconPosition(
|
iconFieldSaveIconPosition(
|
||||||
icon.parent,
|
icon.parent,
|
||||||
icon.name .. (icon.isDirectory and "/" or ""),
|
icon.filename .. (icon.isDirectory and "/" or ""),
|
||||||
icon.localX,
|
icon.localX,
|
||||||
icon.localY
|
icon.localY
|
||||||
)
|
)
|
||||||
@ -1095,6 +1095,7 @@ local function anyIconAddInfo(icon, path)
|
|||||||
icon.isDirectory = path:sub(-1) == "/"
|
icon.isDirectory = path:sub(-1) == "/"
|
||||||
|
|
||||||
local name = icon.isDirectory and filesystem.name(path):sub(1, -2) or filesystem.name(path)
|
local name = icon.isDirectory and filesystem.name(path):sub(1, -2) or filesystem.name(path)
|
||||||
|
icon.filename = name
|
||||||
icon.name = userSettings.filesShowExtension and name or filesystem.hideExtension(name)
|
icon.name = userSettings.filesShowExtension and name or filesystem.hideExtension(name)
|
||||||
|
|
||||||
icon.analyseExtension = anyIconAnalyseExtension
|
icon.analyseExtension = anyIconAnalyseExtension
|
||||||
@ -1230,16 +1231,16 @@ local function iconFieldUpdateFileList(iconField)
|
|||||||
iconField:loadIconConfig()
|
iconField:loadIconConfig()
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
-- Хех, прочитал))0
|
||||||
local i, configList, notConfigList = 1, {}, {}
|
local configList, notConfigList = {}, {}
|
||||||
while i <= #list do
|
while #list > 0 do
|
||||||
if iconField.iconConfigEnabled and iconField.iconConfig[list[i]] then
|
if iconField.iconConfigEnabled and iconField.iconConfig[list[1]] then
|
||||||
table.insert(configList, list[i])
|
table.insert(configList, list[1])
|
||||||
else
|
else
|
||||||
table.insert(notConfigList, list[i])
|
table.insert(notConfigList, list[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
table.remove(list, i)
|
table.remove(list, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Filling icons container
|
-- Filling icons container
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user