Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pasting image from clipboard #275

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

Closed
pbek opened this issue Mar 27, 2020 · 18 comments
Closed

Pasting image from clipboard #275

pbek opened this issue Mar 27, 2020 · 18 comments
Assignees

Comments

@pbek
Copy link

pbek commented Mar 27, 2020

I just found out about ksnip today and love it because it can also edit the screenshots! Thank you for the great work!

Unfortunately capturing rectangular screenshots (ksnip installed from the edge snap) doesn't seem to work for me in KDE Neon with my two 4k displays (zoomed to 150%). I guess that's because Qt is reporting the resolution after the zoom.

Primary screen resolution: 2560x1440
Screen resolution(s): 2560x1440, 2560x1440

ksnip thinks I have the full 4k resolutions but the screenshot only gets a part of full image.

So my question / feature request would: Pasting an image from the clipboard so I can capture the screenshot in Spectacle and work with it on ksnip.

@DamirPorobic
Copy link
Member

Can you share a screenshot for the wrong behavior? I would actually expect this to work, I'm using a 4K Display with scaling too and for me it's working, though I have a locally build installed version and not an installed snap. So I think that is a bug that we need to fix.

The other thing is the feature to paste a screenshot. What do you have in mind, how should that work? We already support opening an image, we could simply add a new keyboard shortcut to pase it in there, should be rather a simple code change.

Should we split this in two issues?

@pbek
Copy link
Author

pbek commented Mar 27, 2020

Can you share a screenshot for the wrong behavior?

I did so in #276

What do you have in mind, how should that work?

I guess if the Edit / Paste menu entry doesn't make sense it could simply also be a new entry in the dropdown menu of the New button: From clipboard

@DamirPorobic
Copy link
Member

I'll see that what I can do ;)

@DamirPorobic
Copy link
Member

Done :)

@pbek
Copy link
Author

pbek commented Mar 28, 2020

Awesome, thank you very much! I'll test it as soon I'm in front of a Linux station. (Do you automatically build the snap edge channel from your master branch?)

@pbek
Copy link
Author

pbek commented Mar 28, 2020

Works like a charm! Thank you very much again!

@DamirPorobic
Copy link
Member

Yes we do, but you probably found that out yourself :D

@pbek
Copy link
Author

pbek commented Mar 28, 2020

I did. 😁

Btw. Did you use Ctrl + P on purpose as shortcut for paste (seen on Manjaro KDE, edge snap)?
A more common default would be Ctrl + V (haven't found it anywhere else used yet), plus you already use Ctrl + P for the print dialog.

@pbek
Copy link
Author

pbek commented Mar 28, 2020

I really love knsip, that was the one tool that was missing in my (KDE Life) life! You did a great job on many details and also found your source code and build process inspirational.

@DamirPorobic
Copy link
Member

Well, yeah, your're right of course, should be ctrl + v, will change it in a minute. It was late at night for me xD

Thanks for the nice feedback, glad you like the code :)

@DamirPorobic
Copy link
Member

Fixed and added pasting path to images. You should be able to copy an image in your file browser and past it into ksnip or just copy a path to an image.

@pbek
Copy link
Author

pbek commented Mar 28, 2020

Thank you, that is very useful! In QOwnNotes I have all of the above plus also dropping files into QOwnNotes via drag and drop.

@DamirPorobic
Copy link
Member

How do you handle drag and drop? Via drop event and you get the content from mimeData?

@pbek
Copy link
Author

pbek commented Mar 28, 2020

@DamirPorobic
Copy link
Member

This drag and drop is kind of PITA again, initial setup was like 15min, but making it work with dropping over the annotation area, oh boy. What makes it even more difficult is that the annotation widget is an external library. But I'm on it #282

@pbek
Copy link
Author

pbek commented Mar 30, 2020

but making it work with dropping over the annotation area, oh boy.

because that area is already using drag & drop?

@DamirPorobic
Copy link
Member

No, it kind of work a bit different and I can't get the events via EventFilter and don't want to add that logic so deep down in the application.

@pbek
Copy link
Author

pbek commented Mar 30, 2020

I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants