Skip to content

Draft: Scaffolding work for QML Welcome Page

Sharaf Zaman requested to merge szaman/krita:work/sh-zam/welcome-page into master

The MR implements the new welcome page based on some points in Post Krita 5 Projects. It is currently in WIP and is very open to ideas and suggestions.

Design and goals

Home page

Currently, I've set placeholders to be able to create and open new files, this page will require suggestions as to what all should we put there.

My ideas about the page:

  • Projects model (which currently displays recent files), should be on the home page.
  • Banner if there is an update available.
  • A text box with info about the Krita project and donation.

Projects Page

Currently, the data is fetched from the KisRecentDocumentsModelWrapper to display the recent files, along with it some information like File size and the Last modified date.

image

Ideas about the model:

  • Be able to sort the files in this model using time/name etc.
  • Be able to remove the files, open file in file manager from a drop-down context menu/right-click

References Page

We use links from docs.krita.org to populate the references section. The page is currently static with hardcoded data from Krita docs but we can have a JSON/RSS based model, which we can use to populate the references section, things that could be added maybe something like a manual about a new tool/feature.

image

Tutorials Page

We use Krita's youtube channel feed to populate the page.

image

Featured Page

I haven't created this, even though it shouldn't be a very difficult thing to do on the Krita side. But we'll need to think about the server side, maybe a CDN to distribute a "featured" image, something akin to https://krita-artists.org/tag/featured.

Code todos

Toolbox, dockers

The project proposal suggests that we should remove the toolbox, dockers, toolbars etc. But I have some questions about this.

  1. We currently use a KisQuickWelcomePage (inherits QQuickWidget) as a central widget of KisMainWindow. This makes Krita's default workspace and welcome page use the same layout. But we can make an exception for the Welcome screen to keep the Central widget maximized and then load the layout only when a file is opened. Would this be an ugly hack?   2. Another option that we use KisQuickWelcomePage as a standalone QQuickView to launch the KisMainWindow once the user opens/creates a new file.   3. What should we do with the Menu bar? Like if a user wants to change settings without launching canvas or export resources? Should we remove the menu bar and convert it to something suitable on the QML side?

Qt5.15

For things to work we need Qt version 5.15 and higher, and the updated KF5 libraries. In particular, Kirigami version should be higher than v5.95 because of a crashfix in its API. This in turn requires all the tools to be higher than or equal to v5.95 -- which works just like other versions on Linux, I still have to test Windows and Android.

Testing

Dependency

You'll need Kirigami version v5.95 or higher to test this (this will also require Qt5.15 to be present).

Running

There are two ways to run the project.

  1. Compile Krita from source and everything should run out of the box if the required version of Kirigami is present.
  2. Running libs/ui/welcomepage/qml/main.qml using qmlscene or loading libs/ui/welcomepage/qml/welcomepage.qmlproject using qtcreator. This will load the dummy models and will provide capability to edit UI without compiling everything -- even though this is limited, it sure is handy.

Merge request reports

Loading