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

SVG of the marker tool is not rendered properly on Wayland #2667

Closed
mmahmoudian opened this issue Jun 14, 2022 · 16 comments
Closed

SVG of the marker tool is not rendered properly on Wayland #2667

mmahmoudian opened this issue Jun 14, 2022 · 16 comments
Labels
Bug It's a bug Visuals Graphical-related

Comments

@mmahmoudian
Copy link
Member

Flameshot Version

Flameshot v12.0.0 (6f6a8dd)

Installation Type

Compiled from source

Operating System type and version

Fedora 36 KDE wayland

Description

When compiled from source, the against 6f6a8dd commit, the marker tool's icons is not rendered properly. This is not the case when installed form AUR (same commit) on Manjaro KDE X11.

Steps to reproduce

dnf install flameshot                     # Hack to install runtime files
dnf install kf5-kguiaddons-devel          # Required for wayland clipboard on KDE
dnf install qt5-linguist qt5-qtsvg-devel  # these were not installed by the above hack and were not pre-installed in Fedora KDE spin


git clone https://github.com/flameshot-org/flameshot
cd flameshot
mkdir build
cd build
cmake ../


./src/flameshot gui

Screenshots or screen recordings

System Information

Virtual Machine Manager v4.0.0:

image

@mmahmoudian mmahmoudian added Unconfirmed Bug The bug is not confirmed by anyone else. Bug It's a bug and removed Unconfirmed Bug The bug is not confirmed by anyone else. labels Jun 14, 2022
@mmahmoudian mmahmoudian changed the title SVG of the marker tool is not rendered properly SVG of the marker tool is not rendered properly on Wayland Jun 14, 2022
@mmahmoudian mmahmoudian added the Wayland Wayland specific issues label Jun 14, 2022
@borgmanJeremy
Copy link
Contributor

@RiedleroD Are you able to help on this? It's not urgent I can roll back just that one file until you have time to get to it. I also replicated it in a Fedora KDE VM.

@RiedleroD
Copy link
Contributor

looks fine to me. how is it supposed to look?

@borgmanJeremy
Copy link
Contributor

borgmanJeremy commented Jun 14, 2022

@RiedleroD look at the purple icon not the orange.

@mmahmoudian
Copy link
Member Author

looks fine to me. how is it supposed to look?

The orange is what we used to have and aiming to have and the purple is the one we currently have. The lower part seems to be missing. I'm no svg expert and have no idea why on some computers it looks ok and why on others it doesn't

@RiedleroD
Copy link
Contributor

ohh! sure, I'll have a look at what I messed up last time ;P

tomorrow though. It's become later than expected today.

@mmahmoudian
Copy link
Member Author

@RiedleroD thanks for your time and contributions 👍

@RiedleroD
Copy link
Contributor

RiedleroD commented Jun 15, 2022

I can't reproduce, even rsvg renders this correctly. I'm assuming this is a temporary bug in Qt's svg rendering we can't do anything about, but I'll try to look further into it

@RiedleroD
Copy link
Contributor

also @mmahmoudian your steps to reproduce lack the make command, fyi

@RiedleroD
Copy link
Contributor

my final opinion: this is either a problem with how Qt renders SVGs that is fixed in a newer version, which arch-based distros already have, and fedora doesn't. Try finding out if you can temporarily install a newer version of qt5-qtsvg-devel on your fedora VM.

Also, I've said it, and I'll say it again: Qt's svg renderer sucks and we should switch to resvg or something if possible.

@mmahmoudian
Copy link
Member Author

mmahmoudian commented Jun 15, 2022

also @mmahmoudian your steps to reproduce lack the make command, fyi

Yeah, you are right, sorry about that. I did itin a VM and my clipboard was not mapped to copy exactly the sequence of commands from there. I typed some of it and copied the rest from Jeremy's comment in another issue.

I can't reproduce, even rsvg renders this correctly. I'm assuming this is a temporary bug in Qt's svg rendering we can't do anything about, but I'll try to look further into it

I have the VM. I can give you a download link if you want

this is either a problem with how Qt renders SVGs that is fixed in a newer version, which arch-based distros already have, and fedora doesn't. Try finding out if you can temporarily install a newer version of qt5-qtsvg-devel on your fedora VM.

I cantry to create a manjaro Wayland KDE VM and see if it is reproducible there as well or not.

@RiedleroD
Copy link
Contributor

I have the VM. I can give you a download link if you want

please do. after you've tried the thing below ↓

I can try to create a manjaro Wayland KDE VM and see if it is reproducible there as well or not.

that would be nice. If the same problem persists, try fedora X11 and something else than KDE as well please.

@mmahmoudian
Copy link
Member Author

This issue is not reproducible in Manjaro KDE Wayland:

image

@borgmanJeremy So it seems @RiedleroD hypothesis is correct. But considering that we have a huge Ubuntu and Fedora userbase (my assumption based on the bug reports), I suggest the following in this order

  1. if possible and feasible, switch to the resvg or whatever seems appropriate as per suggestion of @RiedleroD
  2. if previous is not possible, for the time being we revert the optimization for this particular file and perhaps merge it back in the repo after half/one year to cause less issues for users

Of course I have no solid understanding of the work the first suggestion needs, so take it lightly considering that we are getting prepared for v12

@RiedleroD
Copy link
Contributor

I've got no idea how easy this is in practice, but resvg has a drop-in for QtSVG.

I can't write cmake files nor C++ code, otherwise I'd open a PR for this.

@borgmanJeremy
Copy link
Contributor

I think we should just revert to the old SVG for a while. Users would rather have an extra few bytes of data than have a glitched icon

@RiedleroD
Copy link
Contributor

Yeah, I think that's the way to go for the time being.

@borgmanJeremy
Copy link
Contributor

I tested the RPM built by #2668 and its working on Fedora 36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It's a bug Visuals Graphical-related
Projects
None yet
Development

No branches or pull requests

3 participants