Planet KDE logo

Welcome to Planet KDE

This is a feed aggregator that collects what the contributors to the KDE community are writing on their respective blogs
To have your blog added to this aggregator, please read the instructions

Thursday

28 January, 2021

Today, 2021-01-28, is the Plasma Beta Review Day for Plasma 5.21, that is to say, Plasma 5.20.90. Right now it’s a bit after 2 a.m., so after this I’m going to bed so I can be present later. This month I’ve mostly been enjoying my post-job vacation as last year I was bordering burnout. As … Continue reading "Contributing to KDE is easier than you think – Bug triaging"

(by Lucija Oroz)

My name is Lucija Oroz and I am a professional animator from Croatia. In my spare time I love to read about the human mind and human behavior.

The film 45” is my master’s degree project, the largest project I ever did. While working on it, I was so afraid that something would go wrong that I was unable to finish it, so I decided to something to cheer myself up. I got the chance to experience a tandem parachute jump. I was so impressed: it was both scary and beautiful.

That was how the idea was born to combine my film with emotions that people usually experience during good or bad moments in their life.

As a student I fell in love with oil paint animation on glass under a camera. That is a very slow and time-consuming technique, demanding a lot of preparation. With a full-time job in the game industry as an artist and animator, writing and working on pre-production, my time was much more limited and it was hard to keep that up, so I looked for an alternative. One day a colleague told me about Krita. That day, I downloaded the program as soon as I got home. After spending a couple of hours testing brushes and working on test animations, I was hooked!

Krita was very intuitive, without any brush lag, which is very important for the style I prefer. I could finally create animations with almost the same visual effects that you get with oil paint.

Like many other students, I had no budget for buying licences, but Krita is free and it became my number one choice, still is, and will remain.

The post Short film made with Krita appeared first on Krita.

Wednesday

27 January, 2021

With all the fanfare and trumping about Qt 6.0 a small but important part of documentation may have been overlooked: The Qt for Device Creation documentation got a major facelift and reorganization. As part of that we took  feedback and needs from our hardware partners and created something that can be described as a Qt Board Support Package, QBSP cookbook. 

REUSE Compatible Licensing

Just a short announcement that I pushed some commits to github https://github.com/jansenm/systemd-plasmoid and tagged a release 2.0.1. The first ever with a tag. Unfortunately I am not that sure I did that right so in case someone out there packages this and needs more just complain.

The source code now is fully reuse compatible.

$ reuse lint
# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: CC0-1.0, LGPL-2.1-or-later
* Read errors: 0
* Files with copyright information: 42 / 42
* Files with license information: 42 / 42

Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)

We made a big decision to start using CMake to build Qt 6 one and a half years ago. The main reason for the decision was user feedback. Most Qt users wanted to have easier integration of their Qt projects with the rest of their software. According to the studies at that time, CMake was clearly the most commonly used build tool among Qt users - qmake aside. In addition, migrating to CMake gave us an opportunity to get rid of the maintenance burden of our internal build tools. 


Even bigger than the decision was the effort required to migrate to CMake.  Now the essential migration work has been completed and it's time to share our findings.

I’m pleased to announce the immediate availability of Plasma Browser Integration version 1.8 on the Chrome Web Store as well as Firefox Add-Ons page. This release was originally intended to be just a bugfix update, but instead comes with new features, the usual slew of bug fixes and translation updates, but more importantly: it’s now available on the Microsoft Edge store (needs Plasma 5.21)!

Dark blue space background with stars, a cute dragon wearing a red bandana with a "K" on it, sitting ontop of the Earth which has a blue network cable plugged in whose lose end is squiggling around the KDE Plasma logo
Konqi surfing the world wide web

Plasma Browser Integration bridges the gap between your browser and the Plasma desktop. It lets you share links, find browser tabs and visited websites in KRunner, monitor download progress in the notification center, and control music and video playback anytime from within Plasma, or even from your phone using KDE Connect!

What’s new?

(also see the Changelog Page on our Community Wiki)

Microsoft Edge support

As I’ve already teased in October work has been going on to get Plasma Browser Integration officially distributed on the Microsoft store for their new Chromium-based Edge browser which is now available for Linux. Shout out to our lovely KDE Sysadmin team and the KDE e.V. board who made me an account and signed up for Edge’s developer program all within 24 hours between Christmas and New Year’s – these people just don’t get the appreciation they deserve!

Microsoft Edge browser running on Plasma showing the kde.org website with a context menu open and "Open on 'My Phone'" highlighted to demonstrate Plasma Browser Integration with KDE Connect running in the Microsoft Edge browser
Sending a page from Microsoft Edge to your phone via KDE Connect

Grab the extension here.

In order to run the extension from Edge you need at least Plasma 5.21, however, which just had its Beta released, so go check it out. (Note: There’s a bug in 5.21 Beta that will cause the extension to crash on Wayland when closing the browser – this has been fixed for the final release). For older versions of Plasma you may install the extension from the Chrome Web Store but expect that it will identify itself as a generic Chromium browser as it wouldn’t know what an Edge is.

Browser history runner

A handy new KRunner module has been added to Plasma 5.21 that lets you search through your browser history, complementing the open tabs runner nicely. You can search both by title and website URL. It’s also clever enough not to suggest websites that are currently open, as they will be listed by the tabs runner.

KRunner (Run command window) showing results from the user’s browser history for the search term “kde get involved”, listing several KDE wiki pages on that topic
Finding recently visited pages any time from KRunner

You’ll be prompted to grant the extension access to your history the first time you run a search, and of course you can decline if you don’t want to use this feature. Unfortunately, Firefox does not provide a way to retrieve Favicons through the history API.

Optimized tabs runner

The code for Plasma Browser Integration’s open tabs runner, which hasn’t changed much since the extension’s initial release, has been rewritten to provide results more quickly. This was achieved by migrating it to be a DBus Runner, which means KRunner will directly query the extension on DBus for results to a given search term.

Originally introduced specifically for this extension, KRunner is now using DBus for Baloo, open windows, and others, too. KRunner doesn’t care what kind of service is providing the results so you could even write your own little KRunner module in a Python script!

Furthermore, caching of Favicons has been improved, further reducing the time it takes to find an open tab. Finally, from Plasma 5.21 on it will also match subsequences, so that for instance searching for “plamo” will find an open tab named “Plasma Mobile”.

Quick reply in Chromium

A Plasma notification popup from Chromium showing a dummy text and text field where a reply is being typed into
Directly reply to a notification from a website

Not strictly related to this extension but work has been under way to add Plasma’s inline reply feature to Chromium. This enables websites to offer quick replies in notifications created by a Service Worker through a yet to be standardized API addition. Unfortunately, there seems to be no support for or progress on an equivalent for the standard HTML5 Notification API.

Miscellaneous

From Plasma 5.21 the extension can distinguish different flavors of a browser, such as Chrome vs Chrome Beta vs Chrome Unstable. It could also identify Firefox Nightly and derivatives, provided they are properly installed in the system, and not just run from an arbitrary dirctory. A “.desktop” file containing correct metadata needs to be present in the respective XDG applications folder. With that in place download progress, media controls, and other extension features will be matched to the correct browser window.

A popup showing an ongoing file download with “Nightly Web Browser” in the title, demonstrating that it was able to tell it wasn’t just a regular Firefox
Downloading a file with Firefox Nightly

Speaking of downloads, current transfer rate is now calculated and displayed even if the download’s file size isn’t known in advance, as can happen with files that are generated or compressed by the server on the fly. Finally, in Firefox it’s now possible to right click a tab in the tab bar and send it to a device using KDE Connect just like you can with links and images on the website itself.

The Re-flow One day I was looking at the MR (Merge Request) and saw Tomaz Canabrava’s sketch showing the terminal re-flow lines while it shrinks, and I just thought it would be great to have it fully working.

Konqi hunting Plasma 5.21 bugs

I am happy to announce that we are going to hold the second Plasma Beta Review Day on the 28th January from 9.00 CET to at least 20.00 CET. We will meet in a Big Blue Button room and you can join via audio, video or text.

Everybody is encouraged to join, regardless of whether you are a user testing the new release, a bug triager, or a developer. We want to hear your impressions about the beta release and want to focus on any regressions or bugs compared to the last release.

Check out the wiki page for more details.

See you on Thursday!

Featured image of post Pikasso, a simple drawing application in QtQuick with Rust

Following my last blog post about using Rust and Lyon to create custom shapes. I’m happy to announce the creation of Pikasso, a very simple drawing program intended to be used on Plasma Mobile.

Pikasso
Pikasso

Pikasso is very basic and only supports drawing with the mouse/finger and adding rectangles and circles to the scene. An undo feature is also available as well as the possibility to export your beautiful artworks to SVGs. As you can see, Pikasso is not intended to be replacements for Krita. If you want a powerful drawing application just use Krita, it’s awesome. The scope of Pikasso is more similar to Kolourpaint or Paint.exe and intended for children to play a bit with it on Plasma Mobile.

Behind the scene

Behind the scene, Pikasso uses Rust and Lyon to do all the drawing. The entire drawing area is just one QQuickItem with many QSGNodes. This makes Pikasso hardware accelerated.

When drawing, Pikasso creates DrawEvents for storing the drawing. The DrawEvent contains a QPainterPath and a few metadata (line width, pen color and if the QPainterPath should be filled or not. This is inspired by the QtWidgets Scribble example and the Digikam sketch widgets. Using a QPainterPath replaces the usage of the std::variant from my last blog post.

Thanks to Milian on IRC for giving me the hint about just using a QPainterPath. This has the advantage of integrating better with the rest of the Qt ecosystem sine QPainterPath is used to store reusable instructions for QPainter but also supports more features like text rendering. Another advantage of using a QPainterPath is that we get an SVG export feature almost for free with a QSvgGenerator. See the MR from Jonah about this feature..

QPainterPath can be natively used with QPainter, but it can also be in a very simple way transformed to a LyonBuilder object.

rust::Box<LyonBuilder> painterPathToBuilder(const QPainterPath &path)
{
    auto lyonBuilder = new_builder();
    for (int i = 0; i < path.elementCount(); i++) {
        const auto element = path.elementAt(i);
        if (element.isLineTo()) {
            lyonBuilder->line_to(LyonPoint { static_cast<float>(element.x), static_cast<float>(element.y) });
        } else if (element.isMoveTo()) {
            lyonBuilder->move_to(LyonPoint { static_cast<float>(element.x), static_cast<float>(element.y) });
        } else if (element.type ==  QPainterPath::ElementType::CurveToElement) {
            // Cubic is encoded with ctrl1 -> CurveToElement, ctrl2 -> CurveToDataElement and to -> CurveToDataElement
            Q_ASSERT(i + 2 < path.elementCount() && "CurveToElement doesn't have data");
            const auto ctrl1 = path.elementAt(i);
            const auto ctrl2 = path.elementAt(i + 1);
            const auto to = path.elementAt(i + 2);
            lyonBuilder->cubic_bezier_to(
                LyonPoint { static_cast<float>(ctrl1.x), static_cast<float>(ctrl1.y) },
                LyonPoint { static_cast<float>(ctrl2.x), static_cast<float>(ctrl2.y) },
                LyonPoint { static_cast<float>(to.x), static_cast<float>(to.y) }
            );
            i += 2; // we analysed tree elements instead of just one
        }
    }

    return lyonBuilder;
}

And once we have a LyonBuilder object we can render our geometries to the screen. This part didn’t change since the last post.

auto node = new QSGGeometryNode;
auto builder = painterPathToBuilder(drawEvent.path);
LyonGeometry lyonGeometry;
if (!drawEvent.fill) {
    lyonGeometry = build_stroke(std::move(builder), drawEvent.penWidth);
} else {
    lyonGeometry = build_fill(std::move(builder));
}
QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(),
        lyonGeometry.vertices.size(), lyonGeometry.indices.size());

QSGGeometry::Point2D *points = geometry->vertexDataAsPoint2D();
std::size_t i = 0;
for (const auto &vertice: lyonGeometry.vertices) {
    points[i].set(vertice.x, vertice.y);
    i++;
}

quint16* indices = geometry->indexDataAsUShort();
i = 0;
for (const auto indice: lyonGeometry.indices) {
    indices[i] = indice;
    i++;
}

Pikasso, needs to add new nodes for each new DrawEvent but only update the geometry of the last DrawEvent since it’s the only one who could have changed. This makes the painting experience very smooth.

For those interested, this is the code for the updatePaintNodeData method. It’s a bit more complex since Pikasso also handles undo events and needs to cleanup its removed QSGNodes.

Antialiasing

The last problem to solve for Pikasso was antialiasing since the figures on the screen looked pixelized. This was easy to solve by enabling Multisample Antialiasing on my QML DrawingArea. This can be done using the layer.samples property:

DrawingArea {
    anchors.fill: parent
    layer.enabled: true
    layer.samples: 4
}

Future goals

I think Pikasso is already good enough for its intended usage scope. That I might do in the future is to use a similar technique to add annotation supports to KQuickImageEditor, a library I developed for editing images before sending them in NeoChat. This will need a bit of thinking and a lot of refactoring in KQuickImageEditor first.

A lot of stuff happened for Kate and it’s foundation KTextEditor & KSyntaxHighlighting in January 2021 ;)

I will just briefly summarize what is going one feature wise.

Quick Open

Already two weeks ago I pointed out the improvements to our Quick Open dialog.

It not only got some nice visual refresh but a much better fuzzy matching algorithm.

The fuzzy matching algorithm is on its way to be upstream to KCoreAddons to be used by more parts of the KDE universe.

Praise to Waqar Ahmed for implementing this and pushing it to upstream. And thanks to Forrest Smith for allowing us to use his matching algorithm under LGPLv2+!

HUD style command palette

;=) I stole that naming from Nate’s This week in KDE: the Plasma 5.21 beta is here! post.

This dialog provides the same fuzzy matching we have in Quick Open but applies it to all registered actions of the application.

There is some menu items for it? It will find it.

Besides, it even is able to trigger sub menus.

As it works on the KActionCollection of the application without any other dependencies, this might be upstreamed later to e.g. KXMLGui to be usable for other KDE applications, too.

Thanks for this to Waqar Ahmed, too!

Search & Replace

The Search and Replace tool view provided by the corresponding plugin is a central feature of Kate.

I use it a lot myself, especially in combination with the projects plugin. Just type pgrep Kate in your Kate command line (F7) and you get all matches of that in your current active project. Replaced my usual grep -r or git grep inside the Kate terminal tool view years ago.

Both representation and architectural wise this now got some overhaul (and more to come).

We now use the same theme as inside the KTextEditor editor views. This means the matches will look exactly like the text in your editor, same font, same colors.

In addition, the plugin uses now a proper model-view separation and we will try to get multi-threaded search working, too. At the moment still one background thread does the disk search, this will be improved.

Thanks to Kåre Särs & Waqar Ahmed, for working on this.

Semantic Highlighting via LSP

Another nifty feature is the improved semantic highlighting support inside the LSP plugin. This now more properly tries to use the same theme colors as KTextEditor & KSyntaxHighlighting provide, too.

There is still room for improvements, like allowing themes to specify more colors for this. But at least as a start, it already works ok.

See below the a file inside the Kate project without semantic highlighting enabled:

And here with that feature on:

:=) Waqar worked on this, too, the LSP changes were reviewed by Mark Nauwelaerts.

Summary & Outlook

This is not even all that happened in 2021 up to now ;)

As you can see on our team page a lot of new people helped out in the scope of the last year. I hope to see more people showing up there as new contributors. It is a pleasure that Waqar Ahmed & Jan Paul Batrina now have full KDE developer accounts!

Especially Waqar came up with a lot of nifty ideas what could be fixed/improved/added and he did already do a lot of work to actually get these things done!

I actually wanted to write earlier about what cool new stuff is there, but had too much review requests to look after. Great! ;=) No I can read review request instead of light novels in the evening.

In my Kate is 20 years old! post from December 14, 2020 I added summaries of the merge requests we got since we are on our GitLab invent.kde.org instance:

Today, a bit over one month later, these numbers look like:

I would say that is a nice increase ;=)

Naturally, there are small and large merges, but still, KTextEditor’s requests doubled in a bit over one month.

Let’s hope this trend continues!

Thanks to all people that contribute, let’s rock!

Comments?

A matching thread for this can be found here on r/KDE.