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:
parent
9748b57971
commit
78c659ec87
4 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -105,6 +105,10 @@ FocusScope
|
|||
buttonText.selectAll();
|
||||
}
|
||||
}
|
||||
|
||||
onDoubleClicked: {
|
||||
buttonText.selectAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue