Skip to content

Commit d5a17bc

Browse files
committed
Thumbnail: fix incorrectly scaled horizontal margins
The defaults have been updated to match the margin on the time widgets.
1 parent ece1201 commit d5a17bc

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/Thumbnail.moon

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ class Thumbnail extends BarAccent
5757
mp.commandv(
5858
'script-message-to', 'thumbfast', 'thumb',
5959
hoverTime,
60-
clamp( Mouse._rawX - @thumbfast.width / 2, leftMargin, Window._rawW - @thumbfast.width - rightMargin ),
61-
Window._rawH - bottomMargin*Window.osdScale - @thumbfast.height
60+
clamp(
61+
Mouse._rawX - @thumbfast.width / 2,
62+
leftMargin * Window.osdScale,
63+
Window._rawW - @thumbfast.width - (rightMargin * Window.osdScale)
64+
),
65+
Window._rawH - @thumbfast.height - (bottomMargin * Window.osdScale)
6266
)
6367

6468
@needsUpdate = true

src/settings.moon

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ Sets whether or not thumbnails are displayed at all. Note: thumbnail display
245245
requires use of the thumbfast script (See: https://github.com/po5/thumbfast).
246246
]]
247247

248-
settings['thumbnail-left-margin'] = 10
248+
settings['thumbnail-left-margin'] = 4
249249
helpText['thumbnail-left-margin'] = [[
250250
Controls how close to the left edge of the window the thumbnail display can
251251
get.
252252
]]
253253

254-
settings['thumbnail-right-margin'] = 10
254+
settings['thumbnail-right-margin'] = 4
255255
helpText['thumbnail-right-margin'] = [[
256256
Controls how close to the right edge of the window the thumbnail display can
257257
get.

torque-progressbar.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ enable-thumbnail=yes
181181

182182
# Controls how close to the left edge of the window the thumbnail display can
183183
# get.
184-
thumbnail-left-margin=10
184+
thumbnail-left-margin=4
185185

186186
# Controls how close to the right edge of the window the thumbnail display can
187187
# get.
188-
thumbnail-right-margin=10
188+
thumbnail-right-margin=4
189189

190190
# Controls how far above the expanded progress bar the thumbnail display is
191191
# positioned.

0 commit comments

Comments
 (0)