Skip to content

Commit ad98ee9

Browse files
committed
small tweak to fix files grid mode
1 parent b1d09b5 commit ad98ee9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

OSL Programs/apps/System/.Install_system.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
"path": "Origin/(A) System/User Applications",
229229
"name": "Files.osl",
230230
"icon": "w 10 c #ff724f square 0 0 5 5 w 8 c #111 square 0 0 5 5 w 2.5 c #ff724f square -4 3 1 1 line -2.5 3.5 1.5 0 square 0 -1 5 2.5 w 4 square 0 -1 4 1",
231-
"version":"7.3"
231+
"version":"7.4"
232232
},
233233
{
234234
"url": "https://origin.mistium.com/OSL%20Programs/apps/System/Settings.osl",

OSL Programs/apps/System/Files.osl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,9 @@ def "render_files" (
334334

335335
scroll_height = files.len * 45 - 10
336336
if current_display_type == "grid" (
337-
c prim
338-
local per_line = floor(dist(temp_x, 0, temp_x2, 0) / file_size) - 2
337+
frame temp_x temp_y temp_x2 temp_y2 (
338+
local per_line = floor(frame.width / file_size) - 2
339+
)
339340
scroll_height = ceil(files.len / per_line) * file_size - 10
340341
temp_y += 20
341342
)

0 commit comments

Comments
 (0)