This is good to see.  I would like the splash screen to be smaller than 600 
X 600.  It seems much larger than the old screen, and also looks pixelated, 
a surprise for an SVG image.  The SVG image opens at 804 pixels, according 
to Irfanview; trying half that looked about the right size for a splash 
screen, IMHO.  Of course, that will depend on your screen size.  Mine is HD.

Qt supports painting SVG images, and it would seem better to render the 
splash screen that way rather than as a pixmap.  From the Qt6 docs 
<https://doc.qt.io/qt-6/svgrendering.html>:

"The easiest way to render SVG files is to construct a QSvgWidget 
<https://doc.qt.io/qt-6/qsvgwidget.html> and load an SVG file using one of 
the QSvgWidget::load <https://doc.qt.io/qt-6/qsvgwidget.html#load>() 
functions.

QSvgRenderer <https://doc.qt.io/qt-6/qsvgrenderer.html> is the class 
responsible for rendering SVG files for QSvgWidget 
<https://doc.qt.io/qt-6/qsvgwidget.html>, and it can be used directly to 
provide SVG support for custom widgets. To load an SVG file, construct a 
QSvgRenderer <https://doc.qt.io/qt-6/qsvgrenderer.html> with a file name or 
the contents of a file, or call QSvgRenderer::load 
<https://doc.qt.io/qt-6/qsvgrenderer.html#load>() on an existing renderer. 
If the SVG file has been loaded successfully the QSvgRenderer::isValid 
<https://doc.qt.io/qt-6/qsvgrenderer.html#isValid>() will return true.

Once you have loaded the SVG file successfully, you can render it with the 
QSvgRenderer::render <https://doc.qt.io/qt-6/qsvgrenderer.html#render>() 
function. Note that this scheme allows you to render SVG files on all paint 
devices supported by Qt, including QWidget 
<https://doc.qt.io/qt-6/qwidget.html>, QGLWidget, and QImage 
<https://doc.qt.io/qt-6/qimage.html>."
I haven't tried this out yet.  I'll create an issue for this.
On Monday, January 23, 2023 at 6:12:39 AM UTC-5 Edward K. Ream wrote:

> PR #3087 <https://github.com/leo-editor/leo-editor/pull/3087> has been 
> merged into devel.
>
> The new code uses leo/Icons/SplashScreen.svg (Leo's licensed Lion) if it 
> exists.
>
> If that file doesn't exist, Leo falls back to a public-domain bitmapped 
> image.
>
> This PR took two days of work, despite the apparent simplicity of the 
> changes.
>
> Please report any problems immediately. I have tested this code only on 
> Windows.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/60f96fd7-1518-470f-8731-963edad7ab1an%40googlegroups.com.

Reply via email to