Meeting notes about Plasma::Svg

Marco Martin notmart at gmail.com
Wed Mar 22 15:09:35 GMT 2023


All the svg stuff in plasma will be split in a new standalone
framework, at the moment repo living at:
https://invent.kde.org/mart/plasmasvg

New framework atm is called PlasmaSvg but is a library that should be
ok for apps as well (svgs with caching could be nice on android as
well for instance) -> Decided to call it KSvg (a library with that
name existed in kde3 times but not relevant anymore)

We will continue the standalone library, publish it as a framework
then start to move everything plasma to it, after that, we'll kill svg
from Plasma

No changes in Plasma svg stuff should be made anymore in plasma-framework

The framework will have a public library and a QML import
Public library:
* Svg       ->  almost unchanged
* FrameSvg  ->  almost unchanged   (do we still need the distinction
between margins and fixedmargins?)
* Theme     ->  Ideally should die, but we would still need some of it
remaining (more on that later)

QML import:
* SvgItem      -> almost unchanged: the svg property should become an
imagePath string method instead
* FrameSvgItem -> almost unchanged
* Units        -> used for the devicepixelratio scaling, as we want to
kill it, this unit will go.
* Theme        -> shouldn't be accessible in QML anymore, it was used
only for colors, Kirigami::Theme should be used instead (which it
should give plasma colors when used in plasma)
* ColorScope   -> should be removed, all it did is the inherit featue
of Kirigami::Theme

* Plasma::Dialog uses framesvgItem internally from c++, what to do?
have those items publicly exported?


Plasma::Theme
It does separate things:
* path resolution for the svg files (almost like KPackage but slightly different
* colors: should be Kirigami::Theme
* wallpaper in theme  -> kill
* fonts from theme    -> kill
* image and rects cache for the svgs  ->  should be internal api not
an exposed symbol (so we can start requiring timestamps)
* stuff that wraps KWindowSystemS: those are used to choose between
the opaque, normal or translucent versions based on composite and blur
effect, it should become api set by Plasma


Summary of dependencies:
Can something be further slimmed down?
    Archive            to read svgz and do stylesheet before giving it
to the renderer
    ConfigWidgets      KColorScheme, read colorscheme from theme
folder, apply it to stylesheet
    GuiAddons          KImageCache
    IconThemes         KIconEffects (can it be hardcoded at this
point? effect is not even exposed in systemsettings anymore)
    WindowSystem+x11   Loading files from the "translucent" folder
when compositing/blur effect is active, will be replaced by api
exposed by some singleton called by plasma
    Kirigami2          If we are going to directly call Theme/Units
from C++, as SvgItem/FrameSvgItem do for the plasma counterparts


-- 
Marco Martin


More information about the Plasma-devel mailing list