mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 09:13:17 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into feat/js-script-console-auto-complete
This commit is contained in:
commit
08b712281f
9 changed files with 32 additions and 27 deletions
|
@ -22,7 +22,7 @@ ListModel {
|
|||
function swap(a, b) {
|
||||
if (a < b) {
|
||||
move(a, b, 1);
|
||||
move (b - 1, a, 1);
|
||||
move(b - 1, a, 1);
|
||||
} else if (a > b) {
|
||||
move(b, a, 1);
|
||||
move(a - 1, b, 1);
|
||||
|
@ -34,16 +34,17 @@ ListModel {
|
|||
var piv = get(pivot)[sortColumnName];
|
||||
swap(pivot, end - 1);
|
||||
var store = begin;
|
||||
var i;
|
||||
|
||||
for (var i = begin; i < end - 1; ++i) {
|
||||
for (i = begin; i < end - 1; ++i) {
|
||||
var currentElement = get(i)[sortColumnName];
|
||||
if (isSortingDescending) {
|
||||
if (currentElement < piv) {
|
||||
if (currentElement > piv) {
|
||||
swap(store, i);
|
||||
++store;
|
||||
}
|
||||
} else {
|
||||
if (currentElement > piv) {
|
||||
if (currentElement < piv) {
|
||||
swap(store, i);
|
||||
++store;
|
||||
}
|
||||
|
@ -56,16 +57,17 @@ ListModel {
|
|||
var piv = get(pivot)[sortColumnName].toLowerCase();
|
||||
swap(pivot, end - 1);
|
||||
var store = begin;
|
||||
var i;
|
||||
|
||||
for (var i = begin; i < end - 1; ++i) {
|
||||
for (i = begin; i < end - 1; ++i) {
|
||||
var currentElement = get(i)[sortColumnName].toLowerCase();
|
||||
if (isSortingDescending) {
|
||||
if (currentElement < piv) {
|
||||
if (currentElement > piv) {
|
||||
swap(store, i);
|
||||
++store;
|
||||
}
|
||||
} else {
|
||||
if (currentElement > piv) {
|
||||
if (currentElement < piv) {
|
||||
swap(store, i);
|
||||
++store;
|
||||
}
|
||||
|
|
|
@ -317,6 +317,7 @@ Rectangle {
|
|||
|
||||
HifiControlsUit.TextField {
|
||||
id: filterBar;
|
||||
property string previousText: "";
|
||||
colorScheme: hifi.colorSchemes.faintGray;
|
||||
hasClearButton: true;
|
||||
hasRoundedBorder: true;
|
||||
|
@ -329,6 +330,8 @@ Rectangle {
|
|||
|
||||
onTextChanged: {
|
||||
buildFilteredPurchasesModel();
|
||||
purchasesContentsList.positionViewAtIndex(0, ListView.Beginning)
|
||||
filterBar.previousText = filterBar.text;
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
|
@ -647,7 +650,8 @@ Rectangle {
|
|||
|
||||
function sortByDate() {
|
||||
filteredPurchasesModel.sortColumnName = "purchase_date";
|
||||
filteredPurchasesModel.isSortingDescending = false;
|
||||
filteredPurchasesModel.isSortingDescending = true;
|
||||
filteredPurchasesModel.valuesAreNumerical = true;
|
||||
filteredPurchasesModel.quickSort();
|
||||
}
|
||||
|
||||
|
@ -677,7 +681,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
if (sameItemCount !== tempPurchasesModel.count || filterBar.text !== "") {
|
||||
if (sameItemCount !== tempPurchasesModel.count || filterBar.text !== filterBar.previousText) {
|
||||
filteredPurchasesModel.clear();
|
||||
for (var i = 0; i < tempPurchasesModel.count; i++) {
|
||||
filteredPurchasesModel.append(tempPurchasesModel.get(i));
|
||||
|
|
|
@ -41,14 +41,14 @@ QSpinBox, QDoubleSpinBox {
|
|||
|
||||
QDoubleSpinBox::up-arrow,
|
||||
QSpinBox::up-arrow {
|
||||
background-image: url(styles/up.svg);
|
||||
background-image: url(:/styles/up.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
QDoubleSpinBox::down-arrow,
|
||||
QSpinBox::down-arrow {
|
||||
background-image: url(styles/down.svg);
|
||||
background-image: url(:/styles/down.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ QSlider {
|
|||
|
||||
QSlider::groove:horizontal {
|
||||
border: none;
|
||||
background-image: url(styles/slider-bg.svg);
|
||||
background-image: url(:/styles/slider-bg.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ QSlider::groove:horizontal {
|
|||
QSlider::handle:horizontal {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url(styles/slider-handle.svg);
|
||||
background-image: url(:/styles/slider-handle.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ QPushButton#closeButton {
|
|||
border-width: 1px;
|
||||
border-radius: 0;
|
||||
background-color: #fff;
|
||||
background-image: url(styles/close.svg);
|
||||
background-image: url(:/styles/close.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
|
|
@ -63,17 +63,17 @@ QPushButton#cancelButton {
|
|||
}
|
||||
|
||||
#backButton {
|
||||
background-image: url(icons/backButton.svg);
|
||||
background-image: url(:/icons/backButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#forwardButton {
|
||||
background-image: url(icons/forwardButton.svg);
|
||||
background-image: url(:/icons/forwardButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#toParentButton {
|
||||
background-image: url(icons/toParentButton.svg);
|
||||
background-image: url(:/icons/toParentButton.svg);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ QLineEdit {
|
|||
}
|
||||
|
||||
QPushButton#searchButton {
|
||||
background: url(styles/search.svg);
|
||||
background: url(:/styles/search.svg);
|
||||
background-repeat: none;
|
||||
background-position: left center;
|
||||
background-origin: content;
|
||||
|
@ -55,7 +55,7 @@ QPushButton#searchPrevButton {
|
|||
|
||||
QPushButton#revealLogButton {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
background: url(styles/txt-file.svg);
|
||||
background: url(:/styles/txt-file.svg);
|
||||
background-repeat: none;
|
||||
background-position: left center;
|
||||
background-origin: content;
|
||||
|
@ -86,11 +86,11 @@ QCheckBox {
|
|||
}
|
||||
|
||||
QCheckBox::indicator:unchecked {
|
||||
image: url(styles/unchecked.svg);
|
||||
image: url(:/styles/unchecked.svg);
|
||||
}
|
||||
|
||||
QCheckBox::indicator:checked {
|
||||
image: url(styles/checked.svg);
|
||||
image: url(:/styles/checked.svg);
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
|
@ -110,6 +110,6 @@ QComboBox::drop-down {
|
|||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
image: url(styles/filter.png);
|
||||
image: url(:/styles/filter.png);
|
||||
border-width: 0px;
|
||||
}
|
|
@ -2724,7 +2724,7 @@ void Application::showHelp() {
|
|||
queryString.addQueryItem("defaultTab", defaultTab);
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
TabletProxy* tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet(SYSTEM_TABLET));
|
||||
tablet->gotoWebScreen(PathUtils::resourcesPath() + INFO_HELP_PATH + "?" + queryString.toString());
|
||||
tablet->gotoWebScreen(PathUtils::resourcesUrl() + INFO_HELP_PATH + "?" + queryString.toString());
|
||||
DependencyManager::get<HMDScriptingInterface>()->openTablet();
|
||||
//InfoView::show(INFO_HELP_PATH, false, queryString.toString());
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ BaseLogDialog::BaseLogDialog(QWidget* parent) : QDialog(parent, Qt::Window) {
|
|||
|
||||
QFile styleSheet(PathUtils::resourcesPath() + "styles/log_dialog.qss");
|
||||
if (styleSheet.open(QIODevice::ReadOnly)) {
|
||||
QDir::setCurrent(PathUtils::resourcesPath());
|
||||
setStyleSheet(styleSheet.readAll());
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ bool ContextOverlayInterface::createOrDestroyContextOverlay(const EntityItemID&
|
|||
_contextOverlay->setColorPulse(CONTEXT_OVERLAY_UNHOVERED_COLORPULSE);
|
||||
_contextOverlay->setIgnoreRayIntersection(false);
|
||||
_contextOverlay->setDrawInFront(true);
|
||||
_contextOverlay->setURL(PathUtils::resourcesPath() + "images/inspect-icon.png");
|
||||
_contextOverlay->setURL(PathUtils::resourcesUrl() + "images/inspect-icon.png");
|
||||
_contextOverlay->setIsFacingAvatar(true);
|
||||
_contextOverlayID = qApp->getOverlays().addOverlay(_contextOverlay);
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@ void Engine::load() {
|
|||
auto config = getConfiguration();
|
||||
const QString configFile= "config/render.json";
|
||||
|
||||
QUrl path(PathUtils::resourcesPath() + configFile);
|
||||
QFile file(path.toString());
|
||||
QString path(PathUtils::resourcesPath() + configFile);
|
||||
QFile file(path);
|
||||
if (!file.exists()) {
|
||||
qWarning() << "Engine configuration file" << path << "does not exist";
|
||||
} else if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
|
|
Loading…
Reference in a new issue