Launcher Contributions#
The launcher is written in Qt / QML, and works as an optional front-end to FlightGear. It runs early in startup, and modifies the command line and other configuration options passed to the main FlightGear startup.
Philosophy#
The launcher does not aim to provide a GUI for every option and feature of FlightGear, but rather to provide a somewhat simple UI for the commonly used options, some secondary UI for moderately used options, and a way to pass other options generically on the command line.
This is especially important in the Settings page, where a small number of options are presented by default, but each section has additional (hidden by default) options that can be revealed, or found by using the search function.
Every option should include a clear description of what it does, ideally contextually based on the current value.
Settings which can be trivially changed at runtime inside FlightGear, are typically omitted from the launcher, unless they are very commonly needed. (For example, there is no launcher control of audio volume.)
Style & design language#
The launcher is intended to present as monochromatic, with different tones
of a single “theme color” used based on state, in addition to shades of grey.
Regular text should use the StyledText QML element, to ensure the
default font, size and color are used. This is also important to ensure
dark mode and text scaling are possible.
Some particular contrast colors are defined for specific UI, e.g. for
destructive actions using a red warning. In general, see the Style.qml
file for all styling values, such as margin sizes. Dark mode is implemented
as an alternate Style singleton.
The UI uses the concept of a “strut size” which sets various baseline dimensions. With care, this can be adjusted to give a looser or tighter visual spacing.
Icons are stored as monochrome SVGs, and can be re-colored at runtime based on the current theme color.
The launcher is used by different people in both portraint and landscape mode, and this unfortunately complicates optimizing the visual layout. One piece of feedback during early development was that maximizing the number of aircraft which could be viewed at once, was an important goal. The design of the current list delegate, the grid mode, and the drill down to the aircraft details page, are based on this.
Implementation#
The UI follows standard best practice for view/model separation in QML
applications, with a collection of C++ controllers exposing properties,
a few Q_INVOKABLE() methods, and various custom models. For many small
additions, such as adding a new setting, simply follow the style of the
surrounding code.
Getting Started Tips#
The launcher includes a “getting started” tips feature, where on each screen, a small number of on-screen prompts can be displayed calling out particular UI elements, and explaining what they do. These are intended to help discoverability of UI features to new users, without taking up permanent screen space.
Add a GettingStartedTip instance as a child of a
particular UI element, to attach a tip to it.