Launcher: remove obsolete PNG assets
Also switch to using the colored provider for the C++-derived icons, especially the carrier.
|
@ -22,11 +22,12 @@
|
|||
|
||||
#include <limits>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <QVector2D>
|
||||
#include <QMouseEvent>
|
||||
#include <QPaintDevice>
|
||||
#include <QPainter>
|
||||
#include <QQmlEngine>
|
||||
#include <QVector2D>
|
||||
|
||||
#include <Navaids/navrecord.hxx>
|
||||
#include <Navaids/positioned.hxx>
|
||||
|
@ -35,6 +36,7 @@
|
|||
#include <Navaids/NavDataCache.hxx>
|
||||
#include <Navaids/airways.hxx>
|
||||
|
||||
#include "QmlColoredImageProvider.hxx"
|
||||
#include "QtLauncher_fwd.hxx"
|
||||
|
||||
using namespace flightgear;
|
||||
|
@ -157,8 +159,13 @@ void BaseDiagram::paintAirplaneIcon(QPainter* painter, const SGGeod& geod, int h
|
|||
|
||||
void BaseDiagram::paintCarrierIcon(QPainter* painter, const SGGeod& geod, int headingDeg)
|
||||
{
|
||||
if (m_carrierPixmap.isNull()) {
|
||||
auto iconProvider = QmlColoredImageProvider::instance();
|
||||
QSize sz;
|
||||
m_carrierPixmap = iconProvider->requestPixmap("aircraft-carrier?#ff00ff", &sz, {});
|
||||
}
|
||||
|
||||
QPointF pos = project(geod);
|
||||
QPixmap pix(":/svg/aircraft-carrier");
|
||||
pos = m_viewportTransform.map(pos);
|
||||
painter->save();
|
||||
painter->setWorldTransform(m_baseDeviceTransform);
|
||||
|
@ -167,9 +174,9 @@ void BaseDiagram::paintCarrierIcon(QPainter* painter, const SGGeod& geod, int he
|
|||
painter->rotate(headingDeg);
|
||||
|
||||
painter->setRenderHint(QPainter::SmoothPixmapTransform, true);
|
||||
QRect carrierIconRect = pix.rect();
|
||||
QRect carrierIconRect = m_carrierPixmap.rect();
|
||||
carrierIconRect.moveCenter(QPoint(0,0));
|
||||
painter->drawPixmap(carrierIconRect, pix);
|
||||
painter->drawPixmap(carrierIconRect, m_carrierPixmap);
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#ifndef GUI_BASEDIAGRAM_HXX
|
||||
#define GUI_BASEDIAGRAM_HXX
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QHash>
|
||||
#include <QPainterPath>
|
||||
#include <QPixmap>
|
||||
#include <QQuickPaintedItem>
|
||||
#include <QTransform>
|
||||
|
||||
|
@ -131,6 +132,7 @@ private:
|
|||
QTransform m_baseDeviceTransform;
|
||||
QTransform m_viewportTransform;
|
||||
QVector<FGPositionedRef> m_ignored;
|
||||
QPixmap m_carrierPixmap;
|
||||
|
||||
mutable QHash<PositionedID, LabelPosition> m_labelPositions;
|
||||
mutable QVector<QRect> m_labelRects;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QPixmap>
|
||||
|
||||
#include "AIModel/AIManager.hxx"
|
||||
#include "QmlColoredImageProvider.hxx"
|
||||
|
||||
CarriersLocationModel::CarriersLocationModel(QObject *parent)
|
||||
: QAbstractListModel(parent)
|
||||
|
@ -61,6 +62,12 @@ QVariant CarriersLocationModel::data(const QModelIndex &index, int role) const
|
|||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
if (m_carrierPixmap.isNull()) {
|
||||
auto iconProvider = QmlColoredImageProvider::instance();
|
||||
QSize sz;
|
||||
m_carrierPixmap = iconProvider->requestPixmap("aircraft-carrier?theme", &sz, {});
|
||||
}
|
||||
|
||||
const auto& c = mCarriers.at(static_cast<size_t>(index.row()));
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
|
@ -69,7 +76,7 @@ QVariant CarriersLocationModel::data(const QModelIndex &index, int role) const
|
|||
case IdentRole: return c.mCallsign;
|
||||
case DescriptionRole: return c.mDescription;
|
||||
case TypeRole: return "Carrier";
|
||||
case IconRole: return QPixmap(":/svg/aircraft-carrier");
|
||||
case IconRole: return m_carrierPixmap;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <simgear/props/props.hxx>
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QPixmap>
|
||||
|
||||
class CarriersLocationModel : public QAbstractListModel
|
||||
{
|
||||
|
@ -41,6 +42,7 @@ public:
|
|||
|
||||
QStringList parkingsForIndex(int index) const;
|
||||
private:
|
||||
mutable QPixmap m_carrierPixmap;
|
||||
|
||||
struct Carrier
|
||||
{
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
#include <QQmlComponent>
|
||||
#include <QQmlEngine>
|
||||
|
||||
static QmlColoredImageProvider* static_instance = nullptr;
|
||||
|
||||
QmlColoredImageProvider::QmlColoredImageProvider() : QQuickImageProvider(QQmlImageProviderBase::Image)
|
||||
{
|
||||
static_instance = this;
|
||||
}
|
||||
|
||||
void QmlColoredImageProvider::loadStyleColors(QQmlEngine* engine, int styleTypeId)
|
||||
|
@ -49,7 +52,9 @@ QImage QmlColoredImageProvider::requestImage(const QString& id, QSize* size, con
|
|||
if (queryPos >= 0) {
|
||||
path = ":/icon/" + id.left(queryPos); // without the query part
|
||||
const QString q = id.mid(queryPos + 1);
|
||||
if (q == "text") {
|
||||
if (q.startsWith('#')) {
|
||||
c = QColor(q); // allow directly specifying a color
|
||||
} else if (q == "text") {
|
||||
c = _textColor;
|
||||
} else if (q == "themeContrast") {
|
||||
c = _themeContrastColor;
|
||||
|
@ -94,3 +99,14 @@ QImage QmlColoredImageProvider::requestImage(const QString& id, QSize* size, con
|
|||
|
||||
return colored;
|
||||
}
|
||||
|
||||
QPixmap QmlColoredImageProvider::requestPixmap(const QString& id, QSize* size, const QSize& requestedSize)
|
||||
{
|
||||
QImage img = requestImage(id, size, requestedSize);
|
||||
return QPixmap::fromImage(img);
|
||||
}
|
||||
|
||||
QmlColoredImageProvider* QmlColoredImageProvider::instance()
|
||||
{
|
||||
return static_instance;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,12 @@ public:
|
|||
|
||||
QImage requestImage(const QString& id, QSize* size, const QSize& requestedSize) override;
|
||||
|
||||
QPixmap requestPixmap(const QString& id, QSize* size, const QSize& requestedSize) override;
|
||||
|
||||
void loadStyleColors(QQmlEngine* engine, int styleTypeId);
|
||||
|
||||
static QmlColoredImageProvider* instance();
|
||||
|
||||
private:
|
||||
QColor _themeColor, _textColor, _themeContrastColor, _activeColor;
|
||||
QColor _destructiveColor;
|
||||
|
|
Before Width: | Height: | Size: 1.4 KiB |
|
@ -23,7 +23,7 @@
|
|||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
pagecolor="#000000"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
|
@ -64,46 +64,46 @@
|
|||
style="display:inline"
|
||||
transform="translate(319.16852,-98.581295)">
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#009bff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m -290.00765,177.53052 7.30519,71.36096 55.25252,16.03618 215.076885,1.06907 30.407428,-31.5378 94.930487,-12.2944 -1.4833,-45.43582 -94.559656,-10.69078 -31.890713,-38.48681 -219.155941,2.13815 -8.15808,34.74504 z"
|
||||
id="Outline"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#path826"
|
||||
sodipodi:nodetypes="cccccccccccc" />
|
||||
<path
|
||||
style="fill:#009bff;fill-opacity:1;fill-rule:evenodd;stroke:#009bff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m -82.210854,265.48522 0.200595,-46.99016 h -24.786801 l -0.73387,13.23009 -59.39478,-0.54281 -0.6013,33.61805 z"
|
||||
id="Island"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#path828"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#009aff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m -286.7815,192.23034 4.44986,40.62497"
|
||||
id="path832"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#009aff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m -14.968809,127.55112 -271.812691,64.67922 2.97333,48.86685 300.730074,-75.05926"
|
||||
id="LandingMarks"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#path834"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#009aff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M -47.355536,198.09657 100.08338,193.60644"
|
||||
id="Cat1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#path836" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#009aff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M -44.09832,226.88876 102.04272,209.30242"
|
||||
id="Cat2"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="#path836"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#009aff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:29.99999994, 4.99999999;stroke-dashoffset:0;stroke-opacity:1"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:29.99999994, 4.99999999;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="M -273.57231,212.56627 -18.148692,149.13964"
|
||||
id="Centerline"
|
||||
inkscape:connector-curvature="0"
|
||||
|
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 423 B |
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" version="1.1" fill="#ffffff" width="50px" height="50px">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" version="1.1" fill="#000000" width="50px" height="50px">
|
||||
<g id="surface1" fill="#ffffff">
|
||||
<path style=" " d="M 43.03125 11 C 42.722656 11.003906 42.386719 11.03125 42.0625 11.0625 C 40.757813 11.183594 39.332031 11.507813 37.875 12.15625 C 37.875 12.15625 32.265625 14.675781 27.625 16.75 L 16.34375 13.28125 C 15.589844 13.050781 14.773438 12.949219 14 12.9375 C 13.226563 12.925781 12.527344 12.992188 11.875 13.28125 L 10.3125 13.96875 C 10.050781 14.085938 9.734375 14.273438 9.5625 14.65625 C 9.390625 15.039063 9.441406 15.503906 9.59375 15.8125 C 9.890625 16.414063 10.375 16.726563 11.0625 17.09375 L 11.09375 17.125 L 17.71875 21.15625 C 14.382813 22.648438 9.867188 24.671875 9.625 24.78125 C 9.414063 24.875 9.414063 24.839844 9.25 24.78125 C 9.085938 24.722656 8.789063 24.535156 8.40625 24.25 C 7.050781 23.25 5.046875 21.792969 4.46875 21.34375 C 3.578125 20.664063 2.519531 20.65625 1.5625 20.96875 C 1.085938 21.125 0.601563 21.386719 0.28125 21.90625 C -0.0390625 22.425781 -0.0820313 23.179688 0.1875 23.78125 C 0.855469 25.28125 2.964844 29.921875 3.75 31.6875 C 4.175781 32.644531 5.066406 33.304688 6.15625 33.59375 C 7.246094 33.882813 8.558594 33.871094 10.125 33.65625 C 13.257813 33.222656 17.472656 31.867188 22.78125 29.5 C 23.199219 29.3125 23.679688 29.105469 24.125 28.90625 L 21.8125 41.125 L 21.8125 41.1875 C 21.628906 41.933594 21.535156 42.507813 21.78125 43.125 C 21.910156 43.441406 22.226563 43.777344 22.625 43.90625 C 23.023438 44.035156 23.363281 43.957031 23.625 43.84375 L 25.1875 43.15625 C 25.835938 42.867188 26.367188 42.367188 26.875 41.78125 C 27.382813 41.195313 27.859375 40.496094 28.1875 39.78125 L 28.15625 39.78125 L 35.59375 23.6875 C 39.304688 21.949219 42.867188 20.21875 45.46875 18.75 C 46.808594 17.992188 47.90625 17.304688 48.6875 16.6875 C 49.078125 16.378906 49.375 16.097656 49.625 15.75 C 49.875 15.402344 50.148438 14.832031 49.875 14.21875 C 49.253906 12.828125 47.699219 11.796875 45.59375 11.28125 C 44.804688 11.089844 43.960938 10.984375 43.03125 11 Z M 43.03125 13 C 43.796875 13 44.5 13.097656 45.125 13.25 C 46.566406 13.601563 47.445313 14.304688 47.8125 14.78125 C 47.710938 14.886719 47.636719 14.96875 47.4375 15.125 C 46.816406 15.617188 45.796875 16.269531 44.5 17 C 41.910156 18.460938 38.257813 20.246094 34.4375 22.03125 L 34.09375 22.1875 L 33.9375 22.53125 L 26.34375 38.96875 C 26.113281 39.472656 25.765625 40.019531 25.375 40.46875 C 24.984375 40.917969 24.53125 41.242188 24.375 41.3125 L 23.75 41.59375 L 23.75 41.5625 L 26.40625 27.40625 L 26.78125 25.53125 L 25.03125 26.3125 C 23.949219 26.796875 22.925781 27.261719 21.96875 27.6875 C 16.761719 30.007813 12.683594 31.300781 9.875 31.6875 C 8.472656 31.882813 7.382813 31.839844 6.6875 31.65625 C 5.992188 31.472656 5.714844 31.214844 5.5625 30.875 C 4.773438 29.109375 2.695313 24.464844 2.03125 22.96875 C 2.015625 22.929688 2.007813 22.945313 2 22.9375 C 2.035156 22.910156 2.101563 22.871094 2.1875 22.84375 C 2.53125 22.730469 3.164063 22.871094 3.25 22.9375 L 3.25 22.90625 C 3.902344 23.410156 5.859375 24.875 7.21875 25.875 C 7.617188 26.167969 8.019531 26.488281 8.5625 26.6875 C 9.105469 26.886719 9.8125 26.875 10.4375 26.59375 C 10.722656 26.46875 15.738281 24.210938 20.0625 22.28125 C 20.097656 22.265625 20.121094 22.296875 20.15625 22.28125 C 20.253906 22.253906 20.351563 22.210938 20.4375 22.15625 C 20.453125 22.148438 20.453125 22.132813 20.46875 22.125 C 20.480469 22.113281 20.488281 22.105469 20.5 22.09375 C 23.832031 20.609375 24.398438 20.351563 27.78125 18.84375 C 27.8125 18.835938 27.84375 18.824219 27.875 18.8125 C 27.886719 18.808594 27.894531 18.816406 27.90625 18.8125 C 28.117188 18.789063 28.3125 18.703125 28.46875 18.5625 C 28.480469 18.550781 28.488281 18.542969 28.5 18.53125 C 33.097656 16.484375 38.6875 14 38.6875 14 C 39.953125 13.4375 41.167969 13.132813 42.25 13.03125 C 42.519531 13.007813 42.777344 13 43.03125 13 Z M 13.96875 14.9375 C 14.5625 14.949219 15.21875 15.023438 15.75 15.1875 L 24.875 17.96875 C 22.480469 19.039063 22.234375 19.144531 19.96875 20.15625 L 12.09375 15.375 L 12.6875 15.09375 C 12.84375 15.023438 13.375 14.925781 13.96875 14.9375 Z " fill="#ffffff"/>
|
||||
</g>
|
||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 890 B |
Before Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 497 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 939 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 904 B |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 868 B |
Before Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 290 B |
|
@ -29,8 +29,7 @@ Rectangle {
|
|||
Image {
|
||||
id: icon
|
||||
anchors.right: parent.right
|
||||
source: mouse.containsMouse ? "image://colored-icon/add?active"
|
||||
: "image://colored-icon/add?text"
|
||||
source: "image://colored-icon/add?themeContrast"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -86,7 +86,7 @@ Rectangle {
|
|||
// thumbnail border
|
||||
|
||||
border.width: 1
|
||||
border.color: "#7f7f7f"
|
||||
border.color: Style.minorFrameColor
|
||||
|
||||
width: thumbnail.width
|
||||
height: thumbnail.height
|
||||
|
|
|
@ -1,225 +0,0 @@
|
|||
import QtQuick 2.4
|
||||
import FlightGear.Launcher 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
readonly property int margin: 8
|
||||
|
||||
// background
|
||||
|
||||
height: Math.max(contentBox.childrenRect.height, thumbnailBox.height) + footer.height
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
root.ListView.view.currentIndex = model.index
|
||||
_launcher.selectAircraft(model.uri);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: thumbnailBox
|
||||
// thumbnail border
|
||||
|
||||
y: Math.max(0, Math.round((contentBox.childrenRect.height - height) * 0.5))
|
||||
|
||||
border.width: 1
|
||||
border.color: "#7f7f7f"
|
||||
|
||||
width: thumbnail.width
|
||||
height: thumbnail.height
|
||||
|
||||
ThumbnailImage {
|
||||
id: thumbnail
|
||||
|
||||
aircraftUri: model.uri
|
||||
maximumSize.width: 300
|
||||
maximumSize.height: 200
|
||||
}
|
||||
|
||||
Image {
|
||||
id: previewIcon
|
||||
visible: model.hasPreviews
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
source: "qrc:///preview-icon"
|
||||
opacity: showPreviewsMouse.containsMouse ? 1.0 : 0.5
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 100 }
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: showPreviewsMouse
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
visible: model.hasPreviews
|
||||
|
||||
onClicked: {
|
||||
_launcher.showPreviewsFor(model.uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: contentBox
|
||||
|
||||
anchors.leftMargin: root.margin
|
||||
anchors.left: thumbnailBox.right
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: root.margin
|
||||
|
||||
spacing: root.margin
|
||||
|
||||
Item
|
||||
{
|
||||
// box to contain the aircraft title and the variant
|
||||
// selection button arrows
|
||||
|
||||
id: headingBox
|
||||
width: parent.width
|
||||
height: title.height
|
||||
|
||||
ArrowButton {
|
||||
id: previousVariantButton
|
||||
|
||||
visible: (model.variantCount > 0) && (model.activeVariant > 0)
|
||||
arrow: "qrc:///left-arrow-icon"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
|
||||
onClicked: {
|
||||
model.activeVariant = (model.activeVariant - 1)
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: title
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: previousVariantButton.right
|
||||
anchors.right: nextVariantButton.left
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 24
|
||||
text: model.title
|
||||
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
ArrowButton {
|
||||
id: nextVariantButton
|
||||
|
||||
arrow: "qrc:///right-arrow-icon"
|
||||
visible: (model.variantCount > 0) && (model.activeVariant < model.variantCount - 1)
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
|
||||
onClicked: {
|
||||
model.activeVariant = (model.activeVariant + 1)
|
||||
}
|
||||
}
|
||||
|
||||
} // top header box (title + variant arrows)
|
||||
|
||||
// this element normally hides itself unless needed
|
||||
AircraftWarningPanel {
|
||||
id: warningBox
|
||||
aircraftStatus: model.aircraftStatus
|
||||
requiredFGVersion: model.requiredFGVersion
|
||||
width: parent.width
|
||||
}
|
||||
|
||||
Text {
|
||||
id: authors
|
||||
visible: (model.authors != undefined)
|
||||
width: parent.width
|
||||
text: "by: " + model.authors
|
||||
maximumLineCount: 3
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Text {
|
||||
id: description
|
||||
width: parent.width
|
||||
text: model.description
|
||||
maximumLineCount: 10
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
Item {
|
||||
// this area holds the install/update/remove button,
|
||||
// and the ratings grid. when a download / update is
|
||||
// happening, the content is re-arranged to give more room
|
||||
// for the progress bar and feedback
|
||||
id: bottomContent
|
||||
|
||||
readonly property int minimumWidthForBottomContent: ratingGrid.width + downloadPanel.compactWidth + root.margin
|
||||
|
||||
width: Math.max(parent.width, minimumWidthForBottomContent)
|
||||
height: ratingGrid.height
|
||||
|
||||
AircraftDownloadPanel
|
||||
{
|
||||
id: downloadPanel
|
||||
visible: (model.package != undefined)
|
||||
packageSize: model.packageSizeBytes
|
||||
installStatus: model.packageStatus
|
||||
downloadedBytes: model.downloadedBytes
|
||||
uri: model.uri
|
||||
width: parent.width // full width, grid sits on top
|
||||
}
|
||||
|
||||
Grid {
|
||||
id: ratingGrid
|
||||
anchors.right: parent.right
|
||||
|
||||
// hide ratings when the panel is doing something, to
|
||||
// make more room for the progress bar and text
|
||||
visible: model.hasRatings && !downloadPanel.active
|
||||
|
||||
rows: 2
|
||||
columns: 2
|
||||
rowSpacing: root.margin
|
||||
columnSpacing: root.margin
|
||||
|
||||
AircraftRating {
|
||||
title: "Flight model"
|
||||
value: model.ratingFDM;
|
||||
}
|
||||
|
||||
AircraftRating {
|
||||
title: "Systems"
|
||||
value: model.ratingSystems;
|
||||
}
|
||||
|
||||
AircraftRating {
|
||||
title: "Cockpit"
|
||||
value: model.ratingCockpit;
|
||||
}
|
||||
|
||||
AircraftRating {
|
||||
title: "Exterior"
|
||||
value: model.ratingExterior;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // of content column
|
||||
|
||||
Item {
|
||||
id: footer
|
||||
height: 12
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Rectangle {
|
||||
color: "#68A6E1"
|
||||
height: 2
|
||||
width: parent.width - 60
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
} // of root item
|
|
@ -15,10 +15,10 @@ Rectangle {
|
|||
}
|
||||
|
||||
height: width / preview.aspectRatio
|
||||
color: "#7f7f7f"
|
||||
color: Style.minorFrameColor
|
||||
|
||||
border.width: 1
|
||||
border.color: "#3f3f3f"
|
||||
border.color: Style.themeColor
|
||||
|
||||
Timer {
|
||||
id: previewCycleTimer
|
||||
|
|
|
@ -14,7 +14,7 @@ Item {
|
|||
id: icon
|
||||
x: 0
|
||||
y: 0
|
||||
source: "qrc:///cancel-icon-small"
|
||||
source: "image://colored-icon/cancel-small?destructive"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -13,7 +13,7 @@ Item {
|
|||
|
||||
Image {
|
||||
id: icon
|
||||
source: "qrc:///svg/icon-hide"
|
||||
source: "image://colored-icon/hide"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -65,7 +65,7 @@ Item {
|
|||
|
||||
Image {
|
||||
id: closeButton
|
||||
source: "qrc:///white-delete-icon"
|
||||
source: "image://colored-icon/cross?themeContrast"
|
||||
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
|
|
|
@ -28,6 +28,6 @@ Item {
|
|||
|
||||
Image {
|
||||
id: image
|
||||
source: "qrc:///scroll-down-icon-white"
|
||||
source: "image://colored-icon/scroll-down?themeContrast"
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 468 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 413 B |
|
@ -1,10 +1,9 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="history-icon">assets/history-icon.png</file>
|
||||
<file alias="right-arrow-icon">assets/arrow-right-icon.png</file>
|
||||
<file alias="left-arrow-icon">assets/arrow-left-icon.png</file>
|
||||
<file alias="app-icon-large">../../icons/128x128/apps/flightgear.png</file>
|
||||
<file alias="spinner">assets/spinner.gif</file>
|
||||
<file alias="linear-spinner">qml/icons8-linear-spinner.gif</file>
|
||||
|
||||
<file alias="heliport-icon">assets/heliport-icon.png</file>
|
||||
<file alias="seaport-icon">assets/seaport-icon.png</file>
|
||||
<file alias="vor-icon">assets/vor-icon.png</file>
|
||||
|
@ -19,18 +18,6 @@
|
|||
<file alias="ndb-large-icon">assets/ndb-large-icon.png</file>
|
||||
<file alias="airplane-icon">assets/airplane-icon.png</file>
|
||||
<file alias="airport-closed-icon">assets/airport-closed-icon.png</file>
|
||||
<file alias="preview-icon">assets/preview-icon.png</file>
|
||||
<file alias="settings-gear-white">assets/settings-gear-white.png</file>
|
||||
<file alias="toolbox-aircraft">assets/toolbox-aircraft.png</file>
|
||||
<file alias="toolbox-environment">assets/toolbox-environment.png</file>
|
||||
<file alias="toolbox-fly">assets/toolbox-fly.png</file>
|
||||
<file alias="toolbox-location">assets/toolbox-location.png</file>
|
||||
<file alias="toolbox-settings">assets/toolbox-settings.png</file>
|
||||
<file alias="toolbox-summary">assets/toolbox-summary.png</file>
|
||||
<file alias="toolbox-addons">assets/toolbox-addons.png</file>
|
||||
<file alias="toolbox-help">assets/toolbox-help.png</file>
|
||||
<file alias="back-icon">assets/icons8-back-arrow-50.png</file>
|
||||
<file alias="scroll-down-icon-white">assets/icons8-scroll-down-50.png</file>
|
||||
<file>qml/AircraftList.qml</file>
|
||||
<file>qml/AircraftRating.qml</file>
|
||||
<file>qml/ArrowButton.qml</file>
|
||||
|
@ -38,7 +25,6 @@
|
|||
<file>qml/Button.qml</file>
|
||||
<file>qml/AircraftWarningPanel.qml</file>
|
||||
<file>qml/AircraftDetailsView.qml</file>
|
||||
<file>qml/AircraftFullDelegate.qml</file>
|
||||
<file>qml/AircraftCompactDelegate.qml</file>
|
||||
<file>qml/SearchButton.qml</file>
|
||||
<file>qml/AircraftPreviewPanel.qml</file>
|
||||
|
@ -48,9 +34,7 @@
|
|||
<file>qml/ToggleSwitch.qml</file>
|
||||
<file>qml/RatingSlider.qml</file>
|
||||
<file>qml/PopupChoice.qml</file>
|
||||
<file alias="up-down-arrow">assets/up-down-arrow.png</file>
|
||||
<file>qml/AircraftVariantChoice.qml</file>
|
||||
<file alias="search-icon-small">assets/search-icon-small.png</file>
|
||||
<file>qml/AircraftRatingsPanel.qml</file>
|
||||
<file>qml/NoDefaultCatalogPanel.qml</file>
|
||||
<file>qml/ListHeaderBox.qml</file>
|
||||
|
@ -78,11 +62,6 @@
|
|||
<file>qml/AddOns.qml</file>
|
||||
<file>qml/DragToReorderButton.qml</file>
|
||||
<file>qml/AddButton.qml</file>
|
||||
<file alias="cancel-icon">qml/icons8-cancel-50.png</file>
|
||||
<file alias="reorder-list-icon">qml/icons8-drag-reorder-filled-50.png</file>
|
||||
<file alias="cancel-icon-small">qml/icons8-cancel-25.png</file>
|
||||
<file alias="reorder-list-icon-small">qml/icons8-drag-reorder-filled-25.png</file>
|
||||
<file alias="add-icon">qml/icons8-plus-26.png</file>
|
||||
<file>qml/DeleteButton.qml</file>
|
||||
<file>qml/YesNoPanel.qml</file>
|
||||
<file>qml/PathListDelegate.qml</file>
|
||||
|
@ -93,8 +72,6 @@
|
|||
<file>qml/LocationAirportView.qml</file>
|
||||
<file>qml/LocationNavaidView.qml</file>
|
||||
<file>qml/LocationCarrierView.qml</file>
|
||||
<file alias="linear-spinner">qml/icons8-linear-spinner.gif</file>
|
||||
<file alias="ellipsis-icon">qml/icons8-ellipsis-filled-50.png</file>
|
||||
<file>qml/RadioButton.qml</file>
|
||||
<file>qml/IntegerSpinbox.qml</file>
|
||||
<file>qml/DoubleSpinbox.qml</file>
|
||||
|
@ -111,8 +88,6 @@
|
|||
<file>qml/ToggleBox.qml</file>
|
||||
<file>qml/LocationAltitudeRow.qml</file>
|
||||
<file>qml/CatalogDelegate.qml</file>
|
||||
<file alias="clear-text-icon">assets/icons8-clear-symbol-26.png</file>
|
||||
<file alias="white-delete-icon">assets/white-cross-icon.png</file>
|
||||
<file>qml/FlightPlan.qml</file>
|
||||
<file>qml/PlainTextEditBox.qml</file>
|
||||
<file>qml/HeaderBox.qml</file>
|
||||
|
@ -135,8 +110,6 @@
|
|||
<file>qml/IconButton.qml</file>
|
||||
<file>qml/FavouriteToggleButton.qml</file>
|
||||
<file>qml/VariantMenu.qml</file>
|
||||
<file alias="favourite-icon-filled">assets/icons8-christmas-star-filled.png</file>
|
||||
<file alias="favourite-icon-outline">assets/icons8-christmas-star-outline.png</file>
|
||||
<file>qml/FirstRun.qml</file>
|
||||
<file>qml/HelpSupport.qml</file>
|
||||
<file>qml/NotificationArea.qml</file>
|
||||
|
@ -150,34 +123,17 @@
|
|||
<file>qml/GettingStartedTipDisplay.qml</file>
|
||||
<file>qml/CatalogRefreshFailedNotification.qml</file>
|
||||
</qresource>
|
||||
|
||||
<qresource prefix="/preview">
|
||||
<file alias="close-icon">assets/preview-close.png</file>
|
||||
<file alias="left-arrow-icon">assets/preview-left-arrow.png</file>
|
||||
<file alias="right-arrow-icon">assets/preview-right-arrow.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/svg">
|
||||
<file alias="toolbox-fly">assets/icons8-airplane-take-off.svg</file>
|
||||
<file alias="toolbox-environment">assets/icons8-windy-weather-filled.svg</file>
|
||||
<file alias="toolbox-location">assets/icons8-location.svg</file>
|
||||
<file alias="toolbox-settings">assets/icons8-automation.svg</file>
|
||||
<file alias="toolbox-addons">assets/icons8-puzzle.svg</file>
|
||||
<file alias="toolbox-summary">assets/icons8-home.svg</file>
|
||||
<file alias="toolbox-aircraft">assets/icons8-aircraft.svg</file>
|
||||
<file alias="toolbox-fly-alt">assets/icons8-rocket.svg</file>
|
||||
<file alias="toolbox-fly-heli">assets/icons8-helicopter.svg</file>
|
||||
<file alias="icon-grid-view">assets/icons8-grid-view.svg</file>
|
||||
<file alias="icon-list-view">assets/icons8-menu.svg</file>
|
||||
<file alias="icon-hide">assets/icons8-hide-50.png</file>
|
||||
<file alias="icon-carrier">assets/icons8-cargo-ship-50.png</file>
|
||||
<file alias="icon-airport">assets/icons8-airport-50.png</file>
|
||||
<file alias="aircraft-carrier">assets/aircraft-carrier-icon.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icon">
|
||||
<file alias="scroll-down">assets/mask-scroll-down.png</file>
|
||||
<file alias="history">assets/mask-history.png</file>
|
||||
<file alias="settings">assets/mask-settings-gear.png</file>
|
||||
<file alias="search">assets/mask-search.png</file>
|
||||
<file alias="carrier">assets/mask-aircraft-carrier.png</file>
|
||||
<file alias="carrier2">assets/mask-carrier2.png</file>
|
||||
<file alias="map-airplane">assets/mask-airplane.png</file>
|
||||
<file alias="airport">assets/mask-airport.png</file>
|
||||
|
@ -212,5 +168,6 @@
|
|||
<file alias="toolbox-fly-alt">assets/icons8-rocket.svg</file>
|
||||
<file alias="toolbox-fly-heli">assets/icons8-helicopter.svg</file>
|
||||
|
||||
<file alias="aircraft-carrier">assets/aircraft-carrier-icon.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|