Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: validate seek handle size with a minimum value of 0.3 #200

Merged
merged 5 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ body:
Disclaimer: The log file may contain identifiable information, such as your username.
Review the log file before sharing and redact any sensitive data if necessary.
validations:
required: true
required: false
- type: checkboxes
attributes:
label: "I carefully read all instructions and confirm that I did the following:"
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ https://github.com/Samillion/ModernZ/blob/main/.github/CONTRIBUTING.md
Reading this link and following the rules will get your pull request reviewed
and merged faster.

You can delete this message after reading the link or if you've read it before already
Delete this message after reading the link
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ A sleek and modern OSC for [mpv](https://mpv.io/), this project is a fork of Mod

Don't like the default white buttons and text? ModernZ is fully customizable! Change colors and button layouts to match your style:

![modernz-colors-top](https://github.com/user-attachments/assets/d8d85855-96d5-4fbe-9d94-e5fb6a0f2111)
![modernz-osc_colors_top](https://github.com/user-attachments/assets/b5f04e5d-91d0-41ae-ba14-ebac4b45aaa5)

![modernz-colors-bottom](https://github.com/user-attachments/assets/6d686c53-843b-46f9-b630-a396e88b95be)
![modernz-osc_colors_bottom](https://github.com/user-attachments/assets/a29bb34e-14e9-4702-9ef3-9f308e71237d)

See the [Color Customization](docs/USER_OPTS.md#colors-and-style) section in the configuration guide for details on how to customize colors and buttons.

Expand Down
2 changes: 1 addition & 1 deletion docs/CONTROLS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ModernZ Controls Guide

![modernz_osc_buttons](https://github.com/user-attachments/assets/4fc6b414-90e8-4b48-883a-5bf6f404db24)
![modernz-osc_buttons](https://github.com/user-attachments/assets/78918891-5442-43dc-b0be-072806b5fd66)

## Button Interactions

Expand Down
5 changes: 5 additions & 0 deletions modernz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3402,6 +3402,11 @@ local function validate_user_opts()
user_opts.windowcontrols = "auto"
end

if user_opts.seekbarhandlesize < 0.3 then
msg.warn("seekbarhandlesize must be 0.3 or higher. Setting it to 0.3 (minimum).")
user_opts.seekbarhandlesize = 0.3
end

if user_opts.volume_control_type ~= "linear" and
user_opts.volume_control_type ~= "logarithmic" then
msg.warn("volumecontrol cannot be '" .. user_opts.volume_control_type .. "'. Ignoring.")
Expand Down