Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix overflow, binding loop and cmake syntax #1853

Merged
11 commits merged into from Jul 13, 2022
1 change: 1 addition & 0 deletions atomic_defi_design/Dex/Addressbook/AddAddressForm.qml
Expand Up @@ -122,6 +122,7 @@ Dex.Rectangle
{
id: useStandardsCheckBox
Layout.preferredWidth: 150
Layout.fillHeight: true
Layout.leftMargin: 4
boxWidth: 22
boxHeight: 22
Expand Down
49 changes: 39 additions & 10 deletions atomic_defi_design/Dex/Addressbook/AddressTypeSelector.qml
Expand Up @@ -13,15 +13,42 @@ Dex.ComboBoxWithSearchBar
{
id: control

property var currentItem: Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.index(currentIndex, 0)
property bool showAssetStandards: false
property var assetStandards: availableNetworkStandards

function resetList()
{
if (showAssetStandards) currentIndex = 0; else { resetSearch(); currentIndex = 1 }
setContentItem(currentIndex)
}

function resetSearch()
{
Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.setFilterFixedString("");
searchBar.textField.text = "";
}

function setContentItem(index)
{
if (showAssetStandards)
{
_contentRow.ticker = assetStandards[index]
_contentRow.name = assetStandards[index]
_contentRow.type = assetStandards[index]
}
else
{
_contentRow.ticker = model.data(model.index(index, 0), Qt.UserRole + 1)
_contentRow.name = model.data(model.index(index, 0), Qt.UserRole + 3)
_contentRow.type = model.data(model.index(index, 0), Qt.UserRole + 9)
}
}

popupForceMaxHeight: true
popupMaxHeight: 220

model: showAssetStandards ? assetStandards : Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy
textRole: showAssetStandards ? "" : "ticker"
textRole: "ticker"

searchBar.visible: !showAssetStandards
searchBar.searchModel: model
Expand Down Expand Up @@ -59,15 +86,17 @@ Dex.ComboBoxWithSearchBar
anchors.left: parent.left
anchors.leftMargin: 13
anchors.verticalCenter: parent.verticalCenter
ticker: showAssetStandards ? assetStandards[currentIndex] : Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.data(control.currentItem, Qt.UserRole + 1)
name: showAssetStandards ? assetStandards[currentIndex] : Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.data(control.currentItem, Qt.UserRole + 3)
type: showAssetStandards ? assetStandards[currentIndex] : Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.data(control.currentItem, Qt.UserRole + 9)
}
}

onCurrentIndexChanged: if (!showAssetStandards && currentIndex === 0) currentIndex = 1
onShowAssetStandardsChanged: if (showAssetStandards) currentIndex = 0; else currentIndex = 1
onVisibleChanged: if (!visible) { Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.setFilterFixedString(""); searchBar.textField.text = ""; }
Component.onDestruction: { Dex.API.app.portfolio_pg.global_cfg_mdl.all_proxy.setFilterFixedString(""); searchBar.textField.text = ""; }
Component.onCompleted: if (showAssetStandards) currentIndex = 0; else currentIndex = 1
onCurrentIndexChanged:
{
if (!showAssetStandards && currentIndex === 0 && searchBar.textField.text == "") currentIndex = 1
setContentItem(currentIndex)
}
onActivated: setContentItem(index)
onShowAssetStandardsChanged: resetList()
onVisibleChanged: if (!visible) resetList()
Component.onDestruction: resetList()
Component.onCompleted: resetList()
}
1 change: 1 addition & 0 deletions atomic_defi_design/Dex/Components/DexCheckBox.qml
Expand Up @@ -64,6 +64,7 @@ CheckBox
font: control.font
color: control.textColor
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
verticalAlignment: Text.AlignVCenter
leftPadding: control.indicator.width + control.spacing
wrapMode: Label.Wrap
Expand Down
4 changes: 2 additions & 2 deletions cmake/install/linux/linux_post_install.cmake
Expand Up @@ -56,8 +56,8 @@ foreach (current_lib ${LIST_LIBS})
file(COPY ${current_lib} DESTINATION ${PROJECT_LIB_PATH})
endforeach ()
message(STATUS "Executing linuxdeployqt to fix dependencies")
message(STATUS "Executing cmd: [${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs="libnss3.so,libnssutil3.so" -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage]")
execute_process(COMMAND ${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs="libnss3.so,libnssutil3.so" -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage
message(STATUS "Executing cmd: [${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage]")
execute_process(COMMAND ${LINUX_DEPLOY_PATH} ${PROJECT_BIN_PATH} -qmldir=${PROJECT_QML_DIR} -bundle-non-qt-libs -exclude-libs='libnss3.so,libnssutil3.so' -unsupported-allow-new-glibc -no-copy-copyright-files -verbose=1 -extra-plugins=iconengines,platformthemes/libqgtk3.so -appimage
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
ECHO_OUTPUT_VARIABLE
ECHO_ERROR_VARIABLE)
Expand Down