Comments (6)
Thanks for the quick replies.
On the left, I was using Xviewer, which indeed seems Gtk-based.
Is there a GitHub repo where I can report this bug or should I do it on https://bugreports.qt.io? I have no experience with Qt.
from vimiv-qt.
I don't know of any Github repo that is more than just a mirror.
https://bugreports.qt.io/ is the way to go, thank you 😊
from vimiv-qt.
Thanks for reporting. I can reproduce the issue even with PyQt6 (did not try PySide6 though, but I also do not know if this could possibly make a difference).
Vimiv relies on QT to do the rendering of the SVGs. So there is nothing we can do about this. AI, under my directives, has created a MVE that illustrates the issue (scroll using the mouse wheel):
import sys
from PyQt6.QtWidgets import QGraphicsView, QGraphicsScene, QApplication
from PyQt6.QtSvgWidgets import QGraphicsSvgItem
from PyQt6.QtGui import QColor, QPainter
SVG_PATH = "./vimiv_problem.svg"
class CustomGraphicsView(QGraphicsView):
def __init__(self):
super().__init__()
self.setRenderHints(
QPainter.RenderHint.Antialiasing | QPainter.RenderHint.SmoothPixmapTransform
)
self.setTransformationAnchor(QGraphicsView.ViewportAnchor.AnchorUnderMouse)
self.setResizeAnchor(QGraphicsView.ViewportAnchor.AnchorUnderMouse)
def wheelEvent(self, event):
zoom_factor = 1.2
if event.angleDelta().y() > 0:
self.scale(zoom_factor, zoom_factor)
else:
self.scale(1 / zoom_factor, 1 / zoom_factor)
def display_svg_image(file_path):
app = QApplication(sys.argv)
view = CustomGraphicsView()
scene = QGraphicsScene()
scene.setBackgroundBrush(QColor("darkgray"))
svg_item = QGraphicsSvgItem(file_path)
scene.addItem(svg_item)
view.setScene(scene)
view.show()
sys.exit(app.exec())
if __name__ == "__main__":
display_svg_image(SVG_PATH)
I suggest that you try some non-QT based rendered to rule-out a faulty SVG. If the issue is with QT, report it to upstream QT.
from vimiv-qt.
Thanks for reporting and thanks @jcjgraf for your quick and conclusive analysis! Exact same issues with PySide6.
I can only agree, and also remember that we had issues with Qt Svg before (see #423), so this is most likely a Qt issue. Especially as you show a perfectly fine screenshot with another imageviewer (Gtk-based I assume?) on the left.
I would second reporting upstream, that could be really helpful! The chance of us doing some internal workaround - or even not using Qt - are near zero. So I would flag and close this for now.
from vimiv-qt.
Thanks. The bug was reported: https://bugreports.qt.io/browse/QTBUG-122413
from vimiv-qt.
Thanks again for opening the issue on the Qt end. Sounds like this was actually recently solved by them. I currently don't have Qt 6.7 just yet, but will be sure to test it once I do and update here.
from vimiv-qt.
Related Issues (20)
- Drop PyQt < 5.15
- Extend CI for various PyQt6 versions
- Switch to PyQt6 by default HOT 2
- First image in directory not shown HOT 10
- completion menu cut when window is small
- plugins not visible HOT 5
- [QUESTION] How do I escape asterisk (*) when typing a command or creating a keybinding HOT 6
- Some SVG files are not detected HOT 1
- [feature request] add missing mime types to the desktop entry file HOT 4
- How to disable the scroll offsett in library and thumbnail view? HOT 5
- invalid literal for int after system update HOT 3
- Crash when getting metadata for svg and avif files HOT 4
- heif Support to view heic images HOT 4
- Force reload? HOT 4
- Force Reload? HOT 1
- wrapping of next/prev
- In the style config library.selected.fg directive has no effect HOT 2
- Specify scroll distance HOT 3
- Unable to bind semicolon HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimiv-qt.