- QML 80.1%
- C++ 10.6%
- CMake 4.3%
- Nix 2.5%
- Shell 1.3%
- Other 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Station select did nothing because StationTileDelegate sets drag.target and handles onPressed. In Silica, BackgroundItem derives from MouseArea, which is where drag, pressed and onPressed come from; ours derived from Item, so the delegate failed to load and took the whole page with it. Adds _showPress alongside, which TileBase reads. IconButton no longer binds its icon to parent.width: apps size the button as icon.width plus a margin, which was a binding loop. On the build side, AboutPage does `import "../about.js"`, which only resolves in the installed layout where about.js sits beside main.qml rather than two levels up as in the source tree, so the QML is now staged as it ships. fahrplan's 3rdparty/QuickDownload is an uninitialised submodule, so its stub moves to test/stubs-plugins and is on the engine's import path - separate from test/stubs so the real C++ Fahrplan module is never shadowed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194J9w6L4ddad74itMAFzt9 |
||
| demo | ||
| Sailfish/Silica | ||
| test | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| sailaway | ||
SailAway
Run Sailfish OS applications on mainline Qt 6.
Sailfish.Silica is proprietary and Qt5-only, which is what actually pins
Sailfish apps to Sailfish. SailAway reimplements the module in plain QML on top
of Qt Quick, so an unmodified app's QML can import Sailfish.Silica 1.0 and run
on a normal desktop.
No C++, no plugin, no build step: the module is a directory of .qml files plus
a qmldir, found via a QML import path.
Use
nix develop # or: direnv allow
./sailaway path/to/app/qml/harbour-foo.qml
./sailaway demo/harbour-demo.qml
./test/run.sh
SAILAWAY_IMPORTS=/some/dir adds an extra QML import path, for stubbing an
app's C++ types.
Interaction model
Deliberately not Sailfish. Pulley menus are not gestures here: PullDownMenu
and PushUpMenu render as an iOS-style ⋯ button with a dropdown sheet, and
PageStack draws a back chevron rather than relying on an edge swipe.
Implemented
Singletons Theme, Screen; enums Orientation, PageStatus,
PageStackAction, TruncationMode, BusyIndicatorSize, DateTime.
ApplicationWindow, Page, PageStack, PageHeader, Dialog,
DialogHeader, DatePickerDialog, TimePickerDialog, SilicaItem,
SilicaFlickable, SilicaListView, VerticalScrollDecorator,
ViewPlaceholder, PullDownMenu, PushUpMenu, ContextMenu, MenuItem,
MenuLabel, BackgroundItem, ListItem, Label, Button, IconButton,
Icon, HighlightImage, ValueButton, ComboBox, TextField,
SearchField, TextSwitch, Separator, SectionHeader, BusyIndicator,
FadeAnimator, and inert Cover* types.
Plus VisualItemModel / VisualDataModel, which Qt6 dropped but Sailfish apps
still use.
Silica sizes are device pixels for a ~330dpi phone. Theme.scale in
Sailfish/Silica/Theme.qml maps them onto your display.
Tested against
fahrplan's Sailfish UI (19 QML files)
loads and renders its main page, with its C++ backend stubbed in
test/stubs/Fahrplan:
SAILAWAY_IMPORTS=$PWD/test/stubs ./sailaway \
../fahrplan/src/gui/sailfishos/main.qml
That run is what produced most of the component list above. Things it caught
that guessing had missed: BackgroundItem.contentItem (apps size rows off it),
SilicaItem.palette, ApplicationWindow._defaultPageOrientations,
initialPage accepting a url as well as a Component, and that Silica Pages
must be transparent and hidden until pushed — apps declare pages inline as
ordinary children.
Running it on a real Wayland session also showed that Silica icons are black
glyphs with alpha, so tinting has to replace colour through the alpha mask;
MultiEffect.colorization preserves luminance and leaves them black. And that
a tiling compositor hands the window the whole screen, hence the centred
phone-width page column in ApplicationWindow.
Known gaps
- Icon tinting uses
MultiEffectalpha masking, which needs a GPU: it renders nothing under a software/offscreen renderer, so headless screenshots lose icons. image://theme/icons need a C++ image provider. They draw as placeholders.- No page transition animations.
- Missing:
RemorsePopup,Slider,Switch,TextArea,Notice,ProgressBar,EnterKey(attached, needs C++). - Cover pages parse but do nothing — no desktop analogue.
- Platform DBus services (
mce,ngfd,timed,sailfishsecrets, transferengine, keepalive) are absent. For the client side, buildnemo-qml-plugin-dbus; the service side wants a small daemon of its own.