-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Allows opacity to be set via main menu or keyboard shortcuts[correct one] #96
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just a thought, you could do something like this? {
label: 'Set Opacity',
submenu: (() => {
var result = []
let level = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].forEach((num) => {
result.push({
label: `${num}0%`,
accelerator: `CmdOrCtrl+${num}`,
click() {
mainWindow.webContents.send('opacity.sync', num * 10);
mainWindow.setOpacity(num / 10.0);
}
})
})
return result
})()
} |
The-Code-Monkey
approved these changes
Jan 15, 2019
Thanks @alxwrd for the suggestion
@alxwrd Incorporated your suggestion. Just changed forEach to a map function and put a check for CmdOrCtrl+0 |
kamranahmedse
approved these changes
Jan 16, 2019
Thanks guys |
renatobezerra
pushed a commit
to renatobezerra/pennywise
that referenced
this pull request
Feb 15, 2021
…one] (kamranahmedse#96) * It floats ! PDF Support * It floats ! PDF Support * Added PDF Support * PDF Working * Removes opening PDF from file input * Reducing changes * Add files via upload * Update readme.md * Adds video,audio,image,PDF support * Changed logo for merge * asd * yeet * Allows opacity to be set via Menu Tries to fix kamranahmedse#84 * Reduced submenu to map function Thanks @alxwrd for the suggestion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
I made the menu described in #84 . It allows opacity to be changed via the menu or Keyboard shortcuts.
Showing working via keyboard shortcuts :
Apologies about the previous PR, it didn't have the correct file pushed in it.
What platforms did you test it on?
OSX, Windows 7