1
0
Fork 0

Launcher: fix some minor glitches in Aircraft list

- updating of 'no results' box
- sizing of the headers when empty
- double-click to select of the search box when focused
This commit is contained in:
Automatic Release Builder 2020-10-04 19:16:08 +01:00 committed by James Turner
parent 9748b57971
commit 78c659ec87
4 changed files with 11 additions and 4 deletions

View file

@ -51,6 +51,7 @@ void AircraftProxyModel::setAircraftFilterString(QString s)
}
invalidate();
emit countChanged();
}
int AircraftProxyModel::indexForURI(QUrl uri) const
@ -79,6 +80,7 @@ void AircraftProxyModel::setRatingFilterEnabled(bool e)
invalidate();
emit ratingsFilterEnabledChanged();
emit summaryTextChanged();
emit countChanged();
}
QString AircraftProxyModel::summaryText() const
@ -261,4 +263,4 @@ bool AircraftProxyModel::lessThan(const QModelIndex& left, const QModelIndex& ri
} else {
return c < 0;
}
}
}

View file

@ -18,11 +18,12 @@
// launcher headers
#include "QtLauncher.hxx"
#include "AddOnsController.hxx"
#include "AircraftItemModel.hxx"
#include "DefaultAircraftLocator.hxx"
#include "LaunchConfig.hxx"
#include "LocalAircraftCache.hxx"
#include "LauncherController.hxx"
#include "AddOnsController.hxx"
#include "LocationController.hxx"
#include "UpdateChecker.hxx"

View file

@ -149,7 +149,7 @@ FocusScope
Rectangle {
visible: _launcher.searchAircraftModel.count === 0
width: aircraftContent.width
height: Style.strutSize
height: visible ? Style.strutSize : 0
StyledText {
anchors.fill: parent
@ -167,7 +167,7 @@ FocusScope
Rectangle {
visible: _launcher.favouriteAircraftModel.count === 0
width: aircraftContent.width
height: Style.strutSize
height: visible ? Style.strutSize : 0
StyledText {
anchors.fill: parent

View file

@ -105,6 +105,10 @@ FocusScope
buttonText.selectAll();
}
}
onDoubleClicked: {
buttonText.selectAll();
}
}