[Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
This commit is contained in:
parent
95e5f5d34d
commit
d9d6d90dc9
|
@ -158,7 +158,7 @@ ApplicationWindow {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: "Dark mode"
|
||||
onCheckedChanged: Style.changeTheme(checked ? Universal.Dark : Universal.Light, !checked)
|
||||
onCheckedChanged: Theme.changeTheme(checked ? Universal.Dark : Universal.Light, !checked)
|
||||
}
|
||||
|
||||
HotReloaderControls {
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import mainui.activitycenter.views 1.0
|
||||
import mainui.activitycenter.stores 1.0
|
||||
|
||||
|
@ -74,7 +76,7 @@ SplitView {
|
|||
function getContactDetailsAsJson(arg1, arg2) {
|
||||
return JSON.stringify({
|
||||
displayName: "Mock user",
|
||||
displayIcon: Style.png("tokens/AST"),
|
||||
displayIcon: Theme.png("tokens/AST"),
|
||||
publicKey: 123456789,
|
||||
name: "",
|
||||
ensVerified: false,
|
||||
|
@ -130,7 +132,7 @@ SplitView {
|
|||
function getCommunityDetailsAsJson(community) {
|
||||
return {
|
||||
name : "Mock Community",
|
||||
image : Style.png("tokens/UNI"),
|
||||
image : Theme.png("tokens/UNI"),
|
||||
color : "orchid"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ import QtQuick 2.15
|
|||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.controls 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
@ -11,22 +13,22 @@ ColumnLayout {
|
|||
{
|
||||
tokenText: "2 MCT",
|
||||
networkText: "Ethereum",
|
||||
tokenImage: Style.png("tokens/SNT"),
|
||||
networkImage: Style.svg("network/Network=Ethereum"),
|
||||
tokenImage: Theme.png("tokens/SNT"),
|
||||
networkImage: Theme.svg("network/Network=Ethereum"),
|
||||
valid: true
|
||||
},
|
||||
{
|
||||
tokenText: "64 DAI",
|
||||
networkText: "Optimism",
|
||||
tokenImage: Style.png("tokens/DAI"),
|
||||
networkImage: Style.svg("network/Network=Optimism"),
|
||||
tokenImage: Theme.png("tokens/DAI"),
|
||||
networkImage: Theme.svg("network/Network=Optimism"),
|
||||
valid: false
|
||||
},
|
||||
{
|
||||
tokenText: "0.125 ETH",
|
||||
networkText: "Arbitrum",
|
||||
tokenImage: Style.png("tokens/ETH"),
|
||||
networkImage: Style.svg("network/Network=Arbitrum"),
|
||||
tokenImage: Theme.png("tokens/ETH"),
|
||||
networkImage: Theme.svg("network/Network=Arbitrum"),
|
||||
valid: true
|
||||
}
|
||||
]
|
||||
|
|
|
@ -10,6 +10,7 @@ import AppLayouts.Wallet.stores 1.0 as WalletStores
|
|||
import AppLayouts.Wallet.views.collectibles 1.0
|
||||
|
||||
import StatusQ.Core.Utils 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import shared.controls 1.0
|
||||
import shared.stores 1.0 as SharedStores
|
||||
|
@ -106,7 +107,7 @@ SplitView {
|
|||
}
|
||||
return {
|
||||
name : "Mock Community",
|
||||
image : Style.png("tokens/UNI"),
|
||||
image : Theme.png("tokens/UNI"),
|
||||
color : "orchid"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ SplitView {
|
|||
property int membersCount: 184
|
||||
property bool amISectionAdmin: false
|
||||
property color color: "orchid"
|
||||
property url image: Style.png("tokens/UNI")
|
||||
property url image: Theme.png("tokens/UNI")
|
||||
property bool openCreateChat: false
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
@ -14,9 +16,9 @@ ColumnLayout {
|
|||
property bool amISectionAdmin: true
|
||||
property bool isCommunityEditable: true
|
||||
property color color: "orchid"
|
||||
property url image: Style.png("tokens/UNI")
|
||||
property url image: Theme.png("tokens/UNI")
|
||||
property bool colorVisible: false
|
||||
property url banner: ctrlCommunityBanner.checked ? Style.png("settings/communities@2x") : ""
|
||||
property url banner: ctrlCommunityBanner.checked ? Theme.png("settings/communities@2x") : ""
|
||||
readonly property bool shardingEnabled: ctrlShardingEnabled.checked
|
||||
property alias shardIndex: ctrlShardIndex.value
|
||||
property bool adminControlsEnabled: true
|
||||
|
@ -94,15 +96,15 @@ ColumnLayout {
|
|||
RadioButton {
|
||||
checked: true
|
||||
text: qsTr("UNI")
|
||||
onCheckedChanged: if(checked) root.image = Style.png("tokens/UNI")
|
||||
onCheckedChanged: if(checked) root.image = Theme.png("tokens/UNI")
|
||||
}
|
||||
RadioButton {
|
||||
text: qsTr("SOCKS")
|
||||
onCheckedChanged: if(checked) root.image = Style.png("tokens/SOCKS")
|
||||
onCheckedChanged: if(checked) root.image = Theme.png("tokens/SOCKS")
|
||||
}
|
||||
RadioButton {
|
||||
text: qsTr("Status")
|
||||
onCheckedChanged: if(checked) root.image = Style.png("tokens/SNT")
|
||||
onCheckedChanged: if(checked) root.image = Theme.png("tokens/SNT")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ SplitView {
|
|||
modal: false
|
||||
visible: true
|
||||
closePolicy: Popup.NoAutoClose
|
||||
destroyOnClose: true
|
||||
|
||||
isEditMode: ctrlIsEditMode.checked
|
||||
communityId: "ddls"
|
||||
|
@ -61,7 +62,7 @@ SplitView {
|
|||
|
||||
walletAccountsModel: WalletAccountsModel {}
|
||||
walletAssetsModel: root.walletAssetStore.groupedAccountAssetsModel
|
||||
walletCollectiblesModel: ListModel {}
|
||||
walletCollectiblesModel: ManageCollectiblesModel {}
|
||||
permissionsModel: ctrlPermissionsModel.currentValue
|
||||
assetsModel: AssetsModel {}
|
||||
collectiblesModel: CollectiblesModel {}
|
||||
|
|
|
@ -36,7 +36,7 @@ SplitView {
|
|||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
derivationPathSelection.popup(0, testControl.height + Style.current.halfPadding)
|
||||
derivationPathSelection.popup(0, testControl.height + Theme.halfPadding)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.popups 1.0
|
||||
import AppLayouts.Profile.stores 1.0 as ProfileStores
|
||||
|
||||
|
@ -89,7 +91,7 @@ SplitView {
|
|||
property string id: "1"
|
||||
property string name: "Socks"
|
||||
property var members: { "count": 5 }
|
||||
property string image: Style.png("tokens/UNI")
|
||||
property string image: Theme.png("tokens/UNI")
|
||||
property string color: "orchid"
|
||||
}
|
||||
devicesStore: ProfileStores.DevicesStore {
|
||||
|
|
|
@ -6,6 +6,8 @@ import QtQml 2.15
|
|||
import Storybook 1.0
|
||||
import Models 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.popups 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
@ -135,7 +137,7 @@ SplitView {
|
|||
function getContactDetailsAsJson(arg1, arg2) {
|
||||
return JSON.stringify({
|
||||
displayName: "Mock user",
|
||||
displayIcon: Style.png("tokens/AST"),
|
||||
displayIcon: Theme.png("tokens/AST"),
|
||||
publicKey: 123456789,
|
||||
name: "",
|
||||
ensVerified: false,
|
||||
|
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
import QtQml 2.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.popups 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
@ -49,7 +51,7 @@ SplitView {
|
|||
property string id: "1"
|
||||
property string name: "Socks"
|
||||
property var members: { "count": 5 }
|
||||
property string image: Style.png("tokens/UNI")
|
||||
property string image: Theme.png("tokens/UNI")
|
||||
property string color: "orchid"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Models 1.0
|
||||
import utils 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.controls 1.0
|
||||
|
||||
Item {
|
||||
|
@ -12,28 +15,28 @@ Item {
|
|||
readonly property var modelData: [
|
||||
{
|
||||
name: "Optimism",
|
||||
icon: Style.svg(ModelsData.networks.optimism),
|
||||
icon: Theme.svg(ModelsData.networks.optimism),
|
||||
amount: "300",
|
||||
multiplierIndex: 0,
|
||||
infiniteAmount: false
|
||||
},
|
||||
{
|
||||
name: "Arbitrum",
|
||||
icon: Style.svg(ModelsData.networks.arbitrum),
|
||||
icon: Theme.svg(ModelsData.networks.arbitrum),
|
||||
amount: "400000",
|
||||
multiplierIndex: 3,
|
||||
infiniteAmount: false
|
||||
},
|
||||
{
|
||||
name: "Hermez",
|
||||
icon: Style.svg(ModelsData.networks.hermez),
|
||||
icon: Theme.svg(ModelsData.networks.hermez),
|
||||
amount: "0",
|
||||
multiplierIndex: 0,
|
||||
infiniteAmount: true
|
||||
},
|
||||
{
|
||||
name: "Ethereum",
|
||||
icon: Style.svg(ModelsData.networks.ethereum),
|
||||
icon: Theme.svg(ModelsData.networks.ethereum),
|
||||
amount: "12" + "0".repeat(18),
|
||||
multiplierIndex: 18,
|
||||
infiniteAmount: false
|
||||
|
|
|
@ -6,6 +6,8 @@ import Models 1.0
|
|||
import Storybook 1.0
|
||||
import utils 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Communities.panels 1.0
|
||||
|
||||
SplitView {
|
||||
|
@ -32,7 +34,7 @@ SplitView {
|
|||
width: 600
|
||||
anchors.centerIn: parent
|
||||
|
||||
image: Style.png("community/airdrops8_1")
|
||||
image: Theme.png("community/airdrops8_1")
|
||||
|
||||
title: radioButtonsGroup.text
|
||||
subtitle: radioButtonsGroup.text
|
||||
|
|
|
@ -54,7 +54,7 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
|
|||
// Blur background:
|
||||
property int membersCount: 184
|
||||
property bool amISectionAdmin: false
|
||||
property url image: Style.png("tokens/UNI")
|
||||
property url image: Theme.png("tokens/UNI")
|
||||
property var communityItemsModel: model1
|
||||
property string chatDateTimeText: "Dec 31, 2020"
|
||||
property string listUsersText: "simon, Mark Cuban "
|
||||
|
|
|
@ -14,7 +14,7 @@ SplitView {
|
|||
id: root
|
||||
|
||||
property string ytBannerQuality: "hqdefault"
|
||||
property string image: Style.png("tokens/SOCKS")
|
||||
property string image: Theme.png("tokens/SOCKS")
|
||||
property string banner: rawImageCheck.checked ? rawImageCheck.rawImageData : "https://img.youtube.com/vi/yHN1M7vcPKU/%1.jpg".arg(root.ytBannerQuality)
|
||||
property bool globalUtilsReady: false
|
||||
|
||||
|
@ -284,8 +284,8 @@ SplitView {
|
|||
|
||||
RadioButton {
|
||||
text: qsTr("QRC asset: SOCKS")
|
||||
checked: root.image === Style.png("tokens/SOCKS")
|
||||
onToggled: root.image = Style.png("tokens/SOCKS")
|
||||
checked: root.image === Theme.png("tokens/SOCKS")
|
||||
onToggled: root.image = Theme.png("tokens/SOCKS")
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
@ -26,7 +26,7 @@ SplitView {
|
|||
NetworkSelectItemDelegate {
|
||||
id: delegate
|
||||
title: "Ethereum"
|
||||
iconUrl: Style.svg("network/Network=Ethereum")
|
||||
iconUrl: Theme.svg("network/Network=Ethereum")
|
||||
showIndicator: true
|
||||
multiSelection: true
|
||||
checkState: checkStateSelector.checkState
|
||||
|
|
|
@ -8,6 +8,7 @@ import shared.stores 1.0 as SharedStores
|
|||
import mainui 1.0
|
||||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
||||
|
||||
import AppLayouts.stores 1.0 as AppLayoutStores
|
||||
|
@ -78,7 +79,7 @@ SplitView {
|
|||
lastUpdatedLocally: Date.now(),
|
||||
localNickname: localNickname.text,
|
||||
thumbnailImage: "",
|
||||
largeImage: userImage.checked ? Style.png("status-logo") : "",
|
||||
largeImage: userImage.checked ? Theme.png("status-logo") : "",
|
||||
isContact: ctrlIsContact.checked,
|
||||
isBlocked: ctrlIsBlocked.checked,
|
||||
isSyncing: false,
|
||||
|
@ -277,7 +278,7 @@ SplitView {
|
|||
challenge: "The real Alex would know this 100%! What’s my favourite colour?",
|
||||
response: ctrlIncomingVerificationStatus.currentValue === Constants.verificationStatus.verified ? "Yellow!" : "",
|
||||
displayName: ProfileUtils.displayName(localNickname.text, name.text, displayName.text),
|
||||
icon: Style.png("status-logo"),
|
||||
icon: Theme.png("status-logo"),
|
||||
requestedAt: Date.now() - 86400000,
|
||||
repliedAt: Date.now()
|
||||
}
|
||||
|
@ -296,11 +297,6 @@ SplitView {
|
|||
communityTokensStore: SharedStores.CommunityTokensStore {}
|
||||
}
|
||||
|
||||
WalletAssetsStore {
|
||||
id: assetsStore
|
||||
assetsWithFilteredBalances: groupedAccountsAssetsModel
|
||||
}
|
||||
|
||||
SplitView {
|
||||
orientation: Qt.Vertical
|
||||
SplitView.fillWidth: true
|
||||
|
|
|
@ -392,7 +392,7 @@ SplitView {
|
|||
StatusMenu {
|
||||
id: toolTip
|
||||
width: 243 //By design
|
||||
topPadding: Style.current.padding
|
||||
topPadding: Theme.padding
|
||||
bottomPadding: topPadding
|
||||
leftPadding: topPadding
|
||||
rightPadding: topPadding
|
||||
|
|
|
@ -3,8 +3,9 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
import utils 1.0
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
ColumnLayout {
|
||||
Item {
|
||||
|
@ -14,7 +15,7 @@ ColumnLayout {
|
|||
StatusFlowSelector {
|
||||
anchors.centerIn: parent
|
||||
|
||||
icon: Style.png("tokens/SNT")
|
||||
icon: Theme.png("tokens/SNT")
|
||||
title: "Item Selector Title"
|
||||
|
||||
placeholderText: "Example: Empty items"
|
||||
|
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
||||
|
@ -41,7 +43,7 @@ SplitView {
|
|||
anchors.centerIn: parent
|
||||
|
||||
title: titleTextEdit.text
|
||||
icon: Style.png("tokens/SNT")
|
||||
icon: Theme.png("tokens/SNT")
|
||||
iconSize: iconSizeSlider.value
|
||||
|
||||
label.enabled: labelEnabledCheckBox.checked
|
||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15
|
|||
import StatusQ.Components 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Core.Utils 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
@ -13,7 +14,7 @@ ColumnLayout {
|
|||
StatusItemSelector {
|
||||
id: selector
|
||||
|
||||
icon: Style.png("tokens/SNT")
|
||||
icon: Theme.png("tokens/SNT")
|
||||
title: "Item Selector Title"
|
||||
|
||||
placeholderText: "Example: Empty items"
|
||||
|
@ -43,7 +44,7 @@ ColumnLayout {
|
|||
onClicked: {
|
||||
model.append({
|
||||
text: input.text,
|
||||
imageSource: Style.png("tokens/SNT"),
|
||||
imageSource: Theme.png("tokens/SNT"),
|
||||
isIcon: false,
|
||||
operator: model.count > 0 ? OperatorsUtils.Operators.Or
|
||||
: OperatorsUtils.Operators.None
|
||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import Storybook 1.0
|
||||
import Models 1.0
|
||||
|
@ -90,7 +91,7 @@ SplitView {
|
|||
|
||||
networkShortName: priv.selectedNetwork.shortName
|
||||
networkName: priv.selectedNetwork.chainName
|
||||
networkIconPath: Style.svg(priv.selectedNetwork.iconUrl)
|
||||
networkIconPath: Theme.svg(priv.selectedNetwork.iconUrl)
|
||||
networkBlockExplorerUrl: priv.selectedNetwork.blockExplorerURL
|
||||
|
||||
fiatFees: formatBigNumber("1.542567673454567457567678678678989234")
|
||||
|
|
|
@ -3,6 +3,7 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import Storybook 1.0
|
||||
import Models 1.0
|
||||
|
@ -91,7 +92,7 @@ SplitView {
|
|||
|
||||
networkShortName: priv.selectedNetwork.shortName
|
||||
networkName: priv.selectedNetwork.chainName
|
||||
networkIconPath: Style.svg(priv.selectedNetwork.iconUrl)
|
||||
networkIconPath: Theme.svg(priv.selectedNetwork.iconUrl)
|
||||
networkBlockExplorerUrl: priv.selectedNetwork.blockExplorerURL
|
||||
|
||||
serviceProviderName: Constants.swap.paraswapName
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import Models 1.0
|
||||
import Storybook 1.0
|
||||
import utils 1.0
|
||||
|
@ -21,7 +23,7 @@ SplitView {
|
|||
readonly property var modelData: [
|
||||
{
|
||||
name: "Optimism",
|
||||
icon: Style.svg(ModelsData.networks.optimism),
|
||||
icon: Theme.svg(ModelsData.networks.optimism),
|
||||
amount: "300",
|
||||
multiplierIndex: 0,
|
||||
infiniteAmount: false,
|
||||
|
@ -29,7 +31,7 @@ SplitView {
|
|||
},
|
||||
{
|
||||
name: "Arbitrum",
|
||||
icon: Style.svg(ModelsData.networks.arbitrum),
|
||||
icon: Theme.svg(ModelsData.networks.arbitrum),
|
||||
amount: "400000",
|
||||
multiplierIndex: 3,
|
||||
infiniteAmount: false,
|
||||
|
@ -37,7 +39,7 @@ SplitView {
|
|||
},
|
||||
{
|
||||
name: "Hermez",
|
||||
icon: Style.svg(ModelsData.networks.hermez),
|
||||
icon: Theme.svg(ModelsData.networks.hermez),
|
||||
amount: "0",
|
||||
multiplierIndex: 0,
|
||||
infiniteAmount: true,
|
||||
|
@ -45,7 +47,7 @@ SplitView {
|
|||
},
|
||||
{
|
||||
name: "Ethereum",
|
||||
icon: Style.svg(ModelsData.networks.ethereum),
|
||||
icon: Theme.svg(ModelsData.networks.ethereum),
|
||||
amount: "12" + "0".repeat(18),
|
||||
multiplierIndex: 18,
|
||||
infiniteAmount: false,
|
||||
|
|
|
@ -4,8 +4,9 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Storybook 1.0
|
||||
|
||||
import shared.controls 1.0
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import shared.controls 1.0
|
||||
import utils 1.0
|
||||
|
||||
SplitView {
|
||||
|
@ -114,7 +115,7 @@ SplitView {
|
|||
return d.isSavedAccount ? d.addressName : ""
|
||||
}
|
||||
function getEmojiForWalletAddress(address) {
|
||||
return '<img class="emoji" draggable="false" alt="??" src="' + Style.emoji("1f61b") + '?72x72" width="16" height="16" style="vertical-align: top"/>'
|
||||
return '<img class="emoji" draggable="false" alt="??" src="' + Theme.emoji("1f61b") + '?72x72" width="16" height="16" style="vertical-align: top"/>'
|
||||
}
|
||||
function getColorForWalletAddress(address) {
|
||||
return "blue"
|
||||
|
|
|
@ -4,10 +4,13 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Storybook 1.0
|
||||
|
||||
import shared.controls 1.0
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import shared.controls 1.0
|
||||
import utils 1.0
|
||||
|
||||
import AppLayouts.Profile.stores 1.0
|
||||
|
||||
SplitView {
|
||||
id: root
|
||||
|
||||
|
@ -69,7 +72,7 @@ SplitView {
|
|||
}
|
||||
}
|
||||
|
||||
QtObject {
|
||||
ContactsStore {
|
||||
id: contactsStoreMockup
|
||||
readonly property var myContactsModel: QtObject {
|
||||
signal itemChanged(address: string)
|
||||
|
@ -97,7 +100,7 @@ SplitView {
|
|||
return getNameForAddress(address)
|
||||
}
|
||||
function getEmojiForWalletAddress(address) {
|
||||
return '<img class="emoji" draggable="false" alt="??" src="' + Style.emoji("1f61b") + '?72x72" width="16" height="16" style="vertical-align: top"/>'
|
||||
return '<img class="emoji" draggable="false" alt="??" src="' + Theme.emoji("1f61b") + '?72x72" width="16" height="16" style="vertical-align: top"/>'
|
||||
}
|
||||
function getColorForWalletAddress(address) {
|
||||
return "blue"
|
||||
|
|
|
@ -3,21 +3,23 @@ import QtQuick.Controls 2.15
|
|||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import Storybook 1.0
|
||||
import utils 1.0
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
import shared.stores 1.0 as SharedStores
|
||||
|
||||
import AppLayouts.Wallet.stores 1.0 as WalletStores
|
||||
|
||||
import Models 1.0
|
||||
import Storybook 1.0
|
||||
|
||||
SplitView {
|
||||
id: root
|
||||
|
||||
// mirrors ActivityEntry defined in src/app/modules/main/wallet_section/activity/entry.nim
|
||||
readonly property QtObject mockupModelData: QtObject {
|
||||
readonly property string id: "0xdeadbeef"
|
||||
readonly property int timestamp: Date.now() / 1000
|
||||
readonly property int status: ctrlStatus.currentValue
|
||||
readonly property double amount: 123.45
|
||||
|
@ -34,16 +36,16 @@ SplitView {
|
|||
readonly property bool isNFT: ctrlIsNft.checked
|
||||
readonly property bool isCommunityAssetViaAirdrop: isCommunityAssetViaAirdrop.checked
|
||||
readonly property string communityName: "Doodles"
|
||||
readonly property string communityImageUrl: Style.png("collectibles/HappyMeow")
|
||||
readonly property string communityImageUrl: Theme.png("collectibles/HappyMeow")
|
||||
readonly property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
|
||||
readonly property string tokenAddress: "0xdeadbeef"
|
||||
readonly property string tokenInAddress: "0xdeadbeef-00"
|
||||
readonly property string tokenOutAddress: "0xdeadbeef-00"
|
||||
readonly property string tokenInAddress: "0xdeadbeef-in"
|
||||
readonly property string tokenOutAddress: "0xdeadbeef-out"
|
||||
readonly property string nftName: "Happy Meow NFT"
|
||||
readonly property string nftImageUrl: Style.png("collectibles/HappyMeow")
|
||||
readonly property string chainId: "NETWORKID"
|
||||
readonly property string chainIdIn: "NETWORKID-IN"
|
||||
readonly property string chainIdOut: "NETWORKID-OUT"
|
||||
readonly property string nftImageUrl: Theme.png("collectibles/HappyMeow")
|
||||
readonly property int chainId: 1
|
||||
readonly property int chainIdIn: 1
|
||||
readonly property int chainIdOut: 2
|
||||
|
||||
readonly property bool highlight: _highlight
|
||||
function doneHighlighting() {
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtQuick.Layouts 1.15
|
|||
|
||||
import Storybook 1.0
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Wallet 1.0
|
||||
import AppLayouts.Wallet.stores 1.0 as WalletStores
|
||||
|
||||
|
@ -141,7 +143,7 @@ SplitView {
|
|||
property bool isNFT: false
|
||||
property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
|
||||
property string nftName: "Happy Meow"
|
||||
property string nftImageUrl: Style.png("collectibles/HappyMeow")
|
||||
property string nftImageUrl: Theme.png("collectibles/HappyMeow")
|
||||
property string symbol: "ETH"
|
||||
property int txType: Constants.TransactionType.Send
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick 2.15
|
||||
import QtTest 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Wallet.controls 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
@ -16,7 +18,7 @@ Item {
|
|||
NetworkSelectItemDelegate {
|
||||
anchors.centerIn: parent
|
||||
title: "Ethereum"
|
||||
iconUrl: Style.svg("network/Network=Ethereum")
|
||||
iconUrl: Theme.svg("network/Network=Ethereum")
|
||||
onToggled: root.onToggledHandler()
|
||||
}
|
||||
}
|
||||
|
@ -66,11 +68,11 @@ Item {
|
|||
|
||||
function test_icon() {
|
||||
verify(!!controlUnderTest)
|
||||
compare(controlUnderTest.iconUrl, Style.svg("network/Network=Ethereum"))
|
||||
compare(findChild(controlUnderTest, "statusRoundImage").image.source, Style.svg("network/Network=Ethereum"))
|
||||
controlUnderTest.iconUrl = Style.svg("network/Network=Polygon")
|
||||
compare(controlUnderTest.iconUrl, Style.svg("network/Network=Polygon"))
|
||||
compare(findChild(controlUnderTest, "statusRoundImage").image.source, Style.svg("network/Network=Polygon"))
|
||||
compare(controlUnderTest.iconUrl, Theme.svg("network/Network=Ethereum"))
|
||||
compare(findChild(controlUnderTest, "statusRoundImage").image.source, Theme.svg("network/Network=Ethereum"))
|
||||
controlUnderTest.iconUrl = Theme.svg("network/Network=Polygon")
|
||||
compare(controlUnderTest.iconUrl, Theme.svg("network/Network=Polygon"))
|
||||
compare(findChild(controlUnderTest, "statusRoundImage").image.source, Theme.svg("network/Network=Polygon"))
|
||||
}
|
||||
|
||||
function test_indicatorConfig() {
|
||||
|
@ -257,4 +259,4 @@ Item {
|
|||
compare(controlUnderTest.checkState, Qt.Unchecked)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick 2.15
|
||||
import QtTest 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Wallet.views 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
@ -81,7 +83,7 @@ Item {
|
|||
|
||||
verify(!!delegate)
|
||||
compare(delegate.title, model.chainName)
|
||||
compare(delegate.iconUrl, (model.isTest ? Style.svg(model.iconUrl + "-test") : Style.svg(model.iconUrl)))
|
||||
compare(delegate.iconUrl, (model.isTest ? Theme.svg(model.iconUrl + "-test") : Theme.svg(model.iconUrl)))
|
||||
compare(delegate.showIndicator, controlUnderTest.showIndicator)
|
||||
compare(delegate.multiSelection, controlUnderTest.multiSelection)
|
||||
compare(delegate.checkState, controlUnderTest.selection.includes(model.chainId) ? Qt.Checked : Qt.Unchecked)
|
||||
|
@ -340,4 +342,4 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import QtQml 2.15
|
|||
import Models 1.0
|
||||
|
||||
import StatusQ.Core.Utils 0.1 as SQUtils
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Wallet 1.0
|
||||
import AppLayouts.Wallet.popups.swap 1.0
|
||||
|
@ -35,7 +36,7 @@ Item {
|
|||
|
||||
networkShortName: Constants.networkShortChainNames.mainnet
|
||||
networkName: "Mainnet"
|
||||
networkIconPath: Style.svg("network/Network=Ethereum")
|
||||
networkIconPath: Theme.svg("network/Network=Ethereum")
|
||||
networkBlockExplorerUrl: "https://etherscan.io/"
|
||||
|
||||
fiatFees: "1.54 USD"
|
||||
|
@ -159,7 +160,7 @@ Item {
|
|||
compare(smartContractBox.caption, qsTr("Via smart contract"))
|
||||
compare(smartContractBox.primaryText, controlUnderTest.serviceProviderName)
|
||||
compare(smartContractBox.secondaryText, SQUtils.Utils.elideAndFormatWalletAddress(controlUnderTest.serviceProviderContractAddress))
|
||||
compare(smartContractBox.icon, Style.png("swap/paraswap"))
|
||||
compare(smartContractBox.icon, Theme.png("swap/paraswap"))
|
||||
}
|
||||
|
||||
function test_networkInfo() {
|
||||
|
|
|
@ -311,7 +311,7 @@ Item {
|
|||
|
||||
const balance = delegateUnderTest.model.accountBalance.balance
|
||||
|
||||
compare(inlineTagDelegate_0.asset.name, Style.svg("tiny/%1".arg(delegateUnderTest.model.accountBalance.iconUrl)))
|
||||
compare(inlineTagDelegate_0.asset.name, Theme.svg("tiny/%1".arg(delegateUnderTest.model.accountBalance.iconUrl)))
|
||||
compare(inlineTagDelegate_0.asset.color.toString().toUpperCase(), delegateUnderTest.model.accountBalance.chainColor.toString().toUpperCase())
|
||||
compare(inlineTagDelegate_0.titleText.color, balance === "0" ? Theme.palette.baseColor1 : Theme.palette.directColor1)
|
||||
|
||||
|
@ -464,7 +464,7 @@ Item {
|
|||
const inlineTagDelegate_0 = findChild(accountDelegateUnderTest, "inlineTagDelegate_0")
|
||||
verify(!!inlineTagDelegate_0)
|
||||
|
||||
compare(inlineTagDelegate_0.asset.name, Style.svg("tiny/%1".arg(networkModelItem.iconUrl)))
|
||||
compare(inlineTagDelegate_0.asset.name, Theme.svg("tiny/%1".arg(networkModelItem.iconUrl)))
|
||||
compare(inlineTagDelegate_0.asset.color.toString().toUpperCase(), networkModelItem.chainColor.toString().toUpperCase())
|
||||
|
||||
let balancesModel = SQUtils.ModelUtils.getByKey(root.swapAdaptor.walletAssetsStore.baseGroupedAccountAssetModel, "tokensKey", root.swapFormData.fromTokensKey).balances
|
||||
|
|
|
@ -6,6 +6,7 @@ import QtQml 2.15
|
|||
import Models 1.0
|
||||
|
||||
import StatusQ.Core.Utils 0.1 as SQUtils
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Wallet.popups.swap 1.0
|
||||
|
||||
|
@ -38,7 +39,7 @@ Item {
|
|||
|
||||
networkShortName: Constants.networkShortChainNames.mainnet
|
||||
networkName: "Mainnet"
|
||||
networkIconPath: Style.svg("network/Network=Ethereum")
|
||||
networkIconPath: Theme.svg("network/Network=Ethereum")
|
||||
networkBlockExplorerUrl: "https://etherscan.io/"
|
||||
|
||||
serviceProviderName: Constants.swap.paraswapName
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick 2.14
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
QtObject {
|
||||
|
@ -34,36 +37,36 @@ QtObject {
|
|||
|
||||
|
||||
readonly property QtObject assets: QtObject {
|
||||
readonly property string socks: Style.png("tokens/SOCKS")
|
||||
readonly property string zrx: Style.png("tokens/ZRX")
|
||||
readonly property string inch: Style.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string aave: Style.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string amp: Style.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string uni: Style.png("tokens/UNI")
|
||||
readonly property string eth: Style.png("tokens/ETH")
|
||||
readonly property string dai: Style.png("tokens/DAI")
|
||||
readonly property string snt: Style.png("tokens/SNT")
|
||||
readonly property string mana: Style.png("tokens/aMANA")
|
||||
readonly property string socks: Theme.png("tokens/SOCKS")
|
||||
readonly property string zrx: Theme.png("tokens/ZRX")
|
||||
readonly property string inch: Theme.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string aave: Theme.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string amp: Theme.png("tokens/CUSTOM-TOKEN")
|
||||
readonly property string uni: Theme.png("tokens/UNI")
|
||||
readonly property string eth: Theme.png("tokens/ETH")
|
||||
readonly property string dai: Theme.png("tokens/DAI")
|
||||
readonly property string snt: Theme.png("tokens/SNT")
|
||||
readonly property string mana: Theme.png("tokens/aMANA")
|
||||
}
|
||||
|
||||
readonly property QtObject collectibles: QtObject {
|
||||
readonly property string anniversary: Style.png("collectibles/Anniversary")
|
||||
readonly property string cryptoKitties: Style.png("collectibles/CryptoKitties")
|
||||
readonly property string kitty1: Style.png("collectibles/Furbeard")
|
||||
readonly property string kitty1Big: Style.png("collectibles/FurbeardBig")
|
||||
readonly property string kitty2: Style.png("collectibles/Magicat")
|
||||
readonly property string kitty2Big: Style.png("collectibles/MagicatBig")
|
||||
readonly property string kitty3: Style.png("collectibles/HappyMeow")
|
||||
readonly property string kitty3Big: Style.png("collectibles/HappyMeowBig")
|
||||
readonly property string kitty4: Style.png("collectibles/Furbeard")
|
||||
readonly property string kitty4Big: Style.png("collectibles/FurbeardBig")
|
||||
readonly property string kitty5: Style.png("collectibles/Magicat")
|
||||
readonly property string kitty5Big: Style.png("collectibles/MagicatBig")
|
||||
readonly property string superRare: Style.png("collectibles/SuperRare")
|
||||
readonly property string custom: Style.png("collectibles/SNT")
|
||||
readonly property string doodles: Style.png("collectibles/Doodles")
|
||||
readonly property string mana: Style.png("collectibles/MANA-token-icon")
|
||||
readonly property string cryptoPunks: Style.png("collectibles/CryptoPunks")
|
||||
readonly property string anniversary: Theme.png("collectibles/Anniversary")
|
||||
readonly property string cryptoKitties: Theme.png("collectibles/CryptoKitties")
|
||||
readonly property string kitty1: Theme.png("collectibles/Furbeard")
|
||||
readonly property string kitty1Big: Theme.png("collectibles/FurbeardBig")
|
||||
readonly property string kitty2: Theme.png("collectibles/Magicat")
|
||||
readonly property string kitty2Big: Theme.png("collectibles/MagicatBig")
|
||||
readonly property string kitty3: Theme.png("collectibles/HappyMeow")
|
||||
readonly property string kitty3Big: Theme.png("collectibles/HappyMeowBig")
|
||||
readonly property string kitty4: Theme.png("collectibles/Furbeard")
|
||||
readonly property string kitty4Big: Theme.png("collectibles/FurbeardBig")
|
||||
readonly property string kitty5: Theme.png("collectibles/Magicat")
|
||||
readonly property string kitty5Big: Theme.png("collectibles/MagicatBig")
|
||||
readonly property string superRare: Theme.png("collectibles/SuperRare")
|
||||
readonly property string custom: Theme.png("collectibles/SNT")
|
||||
readonly property string doodles: Theme.png("collectibles/Doodles")
|
||||
readonly property string mana: Theme.png("collectibles/MANA-token-icon")
|
||||
readonly property string cryptoPunks: Theme.png("collectibles/CryptoPunks")
|
||||
}
|
||||
|
||||
readonly property QtObject networks: QtObject {
|
||||
|
@ -84,9 +87,9 @@ QtObject {
|
|||
}
|
||||
|
||||
readonly property QtObject onRampProviderImages: QtObject {
|
||||
readonly property string latamex: Style.png("onRampProviders/latamex")
|
||||
readonly property string moonPay: Style.png("onRampProviders/moonPay")
|
||||
readonly property string ramp: Style.png("onRampProviders/ramp")
|
||||
readonly property string mercuryo: Style.png("onRampProviders/mercuryo")
|
||||
readonly property string latamex: Theme.png("onRampProviders/latamex")
|
||||
readonly property string moonPay: Theme.png("onRampProviders/moonPay")
|
||||
readonly property string ramp: Theme.png("onRampProviders/ramp")
|
||||
readonly property string mercuryo: Theme.png("onRampProviders/mercuryo")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import QtQuick 2.15
|
|||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
@ -24,13 +25,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
@ -53,13 +54,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
@ -82,13 +83,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
@ -111,13 +112,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
@ -140,13 +141,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
@ -169,13 +170,13 @@ ListModel {
|
|||
isNFT: false,
|
||||
isCommunityAssetViaAirdrop: false,
|
||||
communityName: "Doodles",
|
||||
communityImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
communityImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337",
|
||||
tokenAddress: "0xdeadbeef",
|
||||
tokenInAddress: "0xdeadbeef-00",
|
||||
tokenOutAddress: "0xdeadbeef-00",
|
||||
nftName: "Happy Meow NFT",
|
||||
nftImageUrl: Style.png("collectibles/HappyMeow"),
|
||||
nftImageUrl: Theme.png("collectibles/HappyMeow"),
|
||||
chainId: "NETWORKID",
|
||||
chainIdIn: "NETWORKID-IN",
|
||||
chainIdOut: "NETWORKID-OUT"
|
||||
|
|
|
@ -58,7 +58,7 @@ Item {
|
|||
StatusCheckBox {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: "advancedMode"
|
||||
font.family: Theme.palette.monoFont.name
|
||||
font.family: Theme.monoFont.name
|
||||
onClicked: {
|
||||
card.advancedMode = checked
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ Item {
|
|||
StatusCheckBox {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: "loading"
|
||||
font.family: Theme.palette.monoFont.name
|
||||
font.family: Theme.monoFont.name
|
||||
onClicked: {
|
||||
card.loading = checked
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -13,7 +13,7 @@ StatusBaseText {
|
|||
readonly property real actualWidth: implicitWidth
|
||||
property real maxWidth: width
|
||||
|
||||
font.family: Theme.palette.monoFont.name
|
||||
font.family: Theme.monoFont.name
|
||||
font.pixelSize: 13
|
||||
elide: Text.ElideMiddle
|
||||
color: Theme.palette.baseColor1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -14,7 +14,7 @@ import StatusQ.Controls 0.1
|
|||
\brief Show an address/ens as defined in design https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?node-id=4222%3A178403 and https://www.figma.com/file/h2Ab3k4wy1Y7SFHEvbcZZx/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop-(Copy)?node-id=1009%3A106451
|
||||
|
||||
Panel's components:
|
||||
- Address: displays the rquired \c address property
|
||||
- Address: displays the required \c address property
|
||||
- Frame: a rounded frame and the \c 0x icon prefix
|
||||
- Copy action: clickable copy icon. Activable using \c showCopy
|
||||
|
||||
|
@ -113,7 +113,7 @@ Item {
|
|||
Layout.preferredWidth: root.expanded || root.ens ? implicitWidth : (implicitWidth * 0.25).toFixed()
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
font.family: Theme.palette.monoFont.name
|
||||
font.family: Theme.monoFont.name
|
||||
font.pixelSize: 15
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideMiddle
|
||||
|
|
|
@ -19,7 +19,7 @@ import StatusQ.Controls 0.1
|
|||
Example of how to use it:
|
||||
\qml
|
||||
StatusFlowSelector {
|
||||
icon: Style.svg("contact_verified")
|
||||
icon: Theme.svg("contact_verified")
|
||||
title: qsTr("Who holds")
|
||||
placeholderItem.visible: listModel.count === 0
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -23,7 +23,7 @@ import StatusQ.Core.Utils 0.1
|
|||
Example of how to use it:
|
||||
\qml
|
||||
StatusItemSelector {
|
||||
icon: Style.svg("contact_verified")
|
||||
icon: Theme.svg("contact_verified")
|
||||
title: qsTr("Who holds")
|
||||
defaultItemText: qsTr("Example: 10 SNT")
|
||||
andOperatorText: qsTr("and")
|
||||
|
|
|
@ -164,7 +164,7 @@ ItemDelegate {
|
|||
icon.width: 32
|
||||
icon.height: 32
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
|
||||
background: Rectangle {
|
||||
|
|
|
@ -287,7 +287,7 @@ Control {
|
|||
messageDetails: root.messageDetails
|
||||
isEdited: root.isEdited
|
||||
allowShowMore: !root.isInPinnedPopup
|
||||
textField.anchors.rightMargin: root.isInPinnedPopup ? /*Style.current.xlPadding*/ 32 : 0 // margin for the "Unpin" floating button
|
||||
textField.anchors.rightMargin: root.isInPinnedPopup ? Theme.xlPadding : 0 // margin for the "Unpin" floating button
|
||||
highlightedLink: root.highlightedLink
|
||||
linkAddressAndEnsName: root.linkAddressAndEnsName
|
||||
onLinkActivated: {
|
||||
|
@ -315,7 +315,7 @@ Control {
|
|||
messageDetails: root.messageDetails
|
||||
isEdited: root.isEdited
|
||||
allowShowMore: !root.isInPinnedPopup
|
||||
textField.anchors.rightMargin: root.isInPinnedPopup ? /*Style.current.xlPadding*/ 32 : 0 // margin for the "Unpin" floating button
|
||||
textField.anchors.rightMargin: root.isInPinnedPopup ? Theme.xlPadding : 0 // margin for the "Unpin" floating button
|
||||
highlightedLink: root.highlightedLink
|
||||
onLinkActivated: {
|
||||
root.linkActivated(link);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
/*!
|
||||
\qmltype StatusRoundedImage
|
||||
|
|
|
@ -297,7 +297,7 @@ Item {
|
|||
clip: true
|
||||
font.pixelSize: 15
|
||||
wrapMode: TextEdit.NoWrap
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 44
|
||||
visible: (parent.width>22)
|
||||
|
@ -352,9 +352,9 @@ Item {
|
|||
width: 360
|
||||
anchors {
|
||||
top: (root.sortedList.count > 0) ? tagSelectorRect.bottom : contactsLabel.bottom
|
||||
topMargin: 8//Style.current.halfPadding
|
||||
topMargin: Theme.halfPadding
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 16//Style.current.padding
|
||||
bottomMargin: Theme.padding
|
||||
}
|
||||
clip: true
|
||||
visible: (!root.showSortedListOnlyWhenText && ((root.sortedList.count > 0) || (edit.text === ""))) ||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtGraphicalEffects 1.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
|
|
@ -97,7 +97,7 @@ Item {
|
|||
selectedTextColor: Theme.palette.directColor1
|
||||
selectionColor: Theme.palette.primaryColor3
|
||||
color: d.isQuote ? Theme.palette.baseColor1 : Theme.palette.directColor1
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
textFormat: Text.RichText
|
||||
wrapMode: root.convertToSingleLine ? Text.NoWrap : Text.Wrap
|
||||
|
|
|
@ -83,7 +83,7 @@ Button {
|
|||
}
|
||||
}
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.weight: Font.Medium
|
||||
font.pixelSize: size === StatusBaseButton.Size.Large ? 15 : 13
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ Item {
|
|||
selectedTextColor: color
|
||||
focus: true
|
||||
font.pixelSize: 15
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
color: root.enabled ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
||||
wrapMode: root.multiline ? Text.WrapAtWordBoundaryOrAnywhere : TextEdit.NoWrap
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ CheckBox {
|
|||
readonly property int indicatorIconHeightSmall: 5
|
||||
}
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: size === StatusCheckBox.Size.Regular ? 15 : 13
|
||||
|
||||
indicator: Rectangle {
|
||||
|
|
|
@ -102,7 +102,7 @@ Item {
|
|||
|
||||
enabled: root.enabled
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: root.size === StatusComboBox.Size.Large ? Theme.secondaryTextFontSize : 13
|
||||
|
||||
padding: 16
|
||||
|
|
|
@ -18,7 +18,7 @@ ItemDelegate {
|
|||
icon.width: 16
|
||||
icon.height: 16
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: 15
|
||||
|
||||
contentItem: RowLayout {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import QtQuick 2.14
|
||||
|
||||
/*!
|
||||
\qmltype StatusLinkText
|
||||
\inherits StatusBaseText
|
||||
|
|
|
@ -22,7 +22,7 @@ RadioButton {
|
|||
}
|
||||
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
|
||||
indicator: Rectangle {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick 2.15
|
||||
|
||||
import QtQuick.Controls 2.14 as QC
|
||||
import QtQuick.Controls 2.15 as QC
|
||||
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Core 0.1
|
||||
|
@ -70,7 +70,7 @@ Item {
|
|||
selectedTextColor: color
|
||||
focus: true
|
||||
font.pixelSize: 15
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
color: Theme.palette.directColor1
|
||||
textFormat: Text.RichText
|
||||
onCursorRectangleChanged: Utils.ensureVisible(flick, cursorRectangle)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtGraphicalEffects 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
@ -10,7 +11,7 @@ Switch {
|
|||
|
||||
property color textColor: Theme.palette.directColor1
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
|
||||
background: MouseArea {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
|
@ -67,7 +68,7 @@ Control {
|
|||
implicitHeight: 30
|
||||
horizontalPadding: d.tagMargins
|
||||
font.pixelSize: 15
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
|
||||
background: Rectangle {
|
||||
color: d.getTagColor(root.isReadonly)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
@ -66,7 +66,7 @@ TextArea {
|
|||
placeholderTextColor: root.enabled ? Theme.palette.baseColor1 : Theme.palette.directColor9
|
||||
|
||||
font {
|
||||
family: Theme.palette.baseFont.name
|
||||
family: Theme.baseFont.name
|
||||
pixelSize: 15
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import StatusQ.Core.Theme 0.1
|
|||
TextField {
|
||||
id: root
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
color: readOnly ? Theme.palette.baseColor1 : Theme.palette.directColor1
|
||||
selectByMouse: true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
/*!
|
||||
|
@ -26,7 +26,7 @@ import StatusQ.Core.Theme 0.1
|
|||
*/
|
||||
|
||||
Text {
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
color: Theme.palette.directColor1
|
||||
linkColor: hoveredLink ? Qt.lighter(Theme.palette.primaryColor1)
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
QtObject {
|
||||
id: statusFontSettings
|
||||
|
||||
property bool bold: false
|
||||
property bool italic: false
|
||||
property int pixelSize: 13
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQml 2.14
|
||||
import QtQml 2.15
|
||||
|
||||
QtObject {
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
ThemePalette {
|
||||
id: root
|
||||
|
||||
name: "dark"
|
||||
|
||||
dropShadow: getColor('black', 0.08)
|
||||
|
||||
baseColor1: getColor('graphite5')
|
||||
baseColor2: getColor('graphite4')
|
||||
baseColor3: getColor('graphite3')
|
||||
|
@ -65,6 +64,7 @@ ThemePalette {
|
|||
miscColor11: getColor('yellow2')
|
||||
miscColor12: getColor('green6')
|
||||
|
||||
dropShadow: getColor('black', 0.08)
|
||||
dropShadow2: getColor('blue8', 0.02)
|
||||
|
||||
statusFloatingButtonHighlight: getColor('blue4', 0.3)
|
||||
|
@ -100,6 +100,12 @@ ThemePalette {
|
|||
|
||||
blockProgressBarColor: directColor7
|
||||
|
||||
// Style compat
|
||||
background: baseColor3
|
||||
separator: directColor7
|
||||
darkGrey: baseColor2
|
||||
secondaryMenuBackground: getColor("graphite2")
|
||||
|
||||
statusAppLayout: QtObject {
|
||||
property color backgroundColor: baseColor3
|
||||
property color rightPanelBackgroundColor: baseColor3
|
||||
|
@ -146,7 +152,7 @@ ThemePalette {
|
|||
statusMenu: QtObject {
|
||||
property color backgroundColor: baseColor3
|
||||
property color hoverBackgroundColor: directColor7
|
||||
property color separatorColor: directColor7
|
||||
property color separatorColor: root.separator
|
||||
}
|
||||
|
||||
statusModal: QtObject {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
ThemePalette {
|
||||
id: root
|
||||
|
||||
name: "light"
|
||||
|
||||
|
@ -98,6 +99,12 @@ ThemePalette {
|
|||
|
||||
blockProgressBarColor: baseColor3
|
||||
|
||||
// Style compat
|
||||
background: white
|
||||
separator: baseColor2
|
||||
darkGrey: baseColor1
|
||||
secondaryMenuBackground: baseColor4
|
||||
|
||||
statusAppLayout: QtObject {
|
||||
property color backgroundColor: white
|
||||
property color rightPanelBackgroundColor: white
|
||||
|
@ -144,7 +151,7 @@ ThemePalette {
|
|||
statusMenu: QtObject {
|
||||
property color backgroundColor: white
|
||||
property color hoverBackgroundColor: baseColor2
|
||||
property color separatorColor: baseColor2
|
||||
property color separatorColor: root.separator
|
||||
}
|
||||
|
||||
statusModal: QtObject {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls.Universal 2.15
|
||||
|
||||
QtObject {
|
||||
id: appTheme
|
||||
|
||||
enum FontSize {
|
||||
FontSizeXS,
|
||||
FontSizeS,
|
||||
|
@ -16,58 +15,210 @@ QtObject {
|
|||
|
||||
property ThemePalette palette: StatusLightTheme {}
|
||||
|
||||
readonly property ThemePalette statusQLightTheme: StatusLightTheme {}
|
||||
readonly property ThemePalette statusQDarkTheme: StatusDarkTheme {}
|
||||
|
||||
readonly property string sqAssetPath: Qt.resolvedUrl("../../../assets/")
|
||||
|
||||
function changeTheme(theme:int, isCurrentSystemThemeDark:bool) {
|
||||
switch (theme) {
|
||||
case Universal.Light:
|
||||
Theme.palette = statusQLightTheme
|
||||
break
|
||||
case Universal.Dark:
|
||||
Theme.palette = statusQDarkTheme
|
||||
break
|
||||
case Universal.System:
|
||||
Theme.palette = isCurrentSystemThemeDark ? statusQDarkTheme : statusQLightTheme
|
||||
break
|
||||
default:
|
||||
console.warn('Unknown theme. Valid themes are "light" and "dark"')
|
||||
}
|
||||
}
|
||||
|
||||
function changeFontSize(fontSize:int) {
|
||||
updateFontSize(fontSize)
|
||||
}
|
||||
|
||||
readonly property var baseFont: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Regular.otf"
|
||||
}
|
||||
|
||||
readonly property var monoFont: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Regular.otf"
|
||||
}
|
||||
|
||||
readonly property var codeFont: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-Regular.ttf"
|
||||
}
|
||||
|
||||
readonly property var _d: QtObject {
|
||||
// specific font variants should not be accessed directly
|
||||
|
||||
// Inter font variants
|
||||
property var baseFontThin: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Thin.otf"
|
||||
}
|
||||
|
||||
property var baseFontExtraLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-ExtraLight.otf"
|
||||
}
|
||||
|
||||
property var baseFontLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Light.otf"
|
||||
}
|
||||
|
||||
property var baseFontMedium: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Medium.otf"
|
||||
}
|
||||
|
||||
property var baseFontBold: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Bold.otf"
|
||||
}
|
||||
|
||||
property var baseFontExtraBold: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-ExtraBold.otf"
|
||||
}
|
||||
|
||||
property var baseFontBlack: FontLoader {
|
||||
source: sqAssetPath + "fonts/Inter/Inter-Black.otf"
|
||||
}
|
||||
|
||||
// Inter Status font variants
|
||||
property var monoFontThin: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Thin.otf"
|
||||
}
|
||||
|
||||
property var monoFontExtraLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-ExtraLight.otf"
|
||||
}
|
||||
|
||||
property var monoFontLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Light.otf"
|
||||
}
|
||||
|
||||
property var monoFontMedium: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Medium.otf"
|
||||
}
|
||||
|
||||
property var monoFontBold: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Bold.otf"
|
||||
}
|
||||
|
||||
property var monoFontExtraBold: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-ExtraBold.otf"
|
||||
}
|
||||
|
||||
property var monoFontBlack: FontLoader {
|
||||
source: sqAssetPath + "fonts/InterStatus/InterStatus-Black.otf"
|
||||
}
|
||||
|
||||
// Roboto font variants
|
||||
property var codeFontThin: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-Thin.ttf"
|
||||
}
|
||||
|
||||
property var codeFontExtraLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-ExtraLight.ttf"
|
||||
}
|
||||
|
||||
property var codeFontLight: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-Light.ttf"
|
||||
}
|
||||
|
||||
property var codeFontMedium: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-Medium.ttf"
|
||||
}
|
||||
|
||||
property var codeFontBold: FontLoader {
|
||||
source: sqAssetPath + "fonts/RobotoMono/RobotoMono-Bold.ttf"
|
||||
}
|
||||
}
|
||||
|
||||
property int secondaryAdditionalTextSize: 17
|
||||
property int primaryTextFontSize: 15
|
||||
property int secondaryTextFontSize: 14
|
||||
property int additionalTextSize: 13
|
||||
property int tertiaryTextFontSize: 12
|
||||
property int asideTextFontSize: 10
|
||||
|
||||
function setTheme(theme) {
|
||||
palette = theme
|
||||
}
|
||||
property int xlPadding: 32
|
||||
property int bigPadding: 24
|
||||
property int padding: 16
|
||||
property int halfPadding: 8
|
||||
property int smallPadding: 10
|
||||
property int radius: 8
|
||||
|
||||
function updateFontSize(fontSize) {
|
||||
function updateFontSize(fontSize:int) {
|
||||
switch (fontSize) {
|
||||
case Theme.FontSizeXS:
|
||||
secondaryAdditionalTextSize = 15
|
||||
primaryTextFontSize = 13
|
||||
secondaryTextFontSize = 12
|
||||
additionalTextSize = 11
|
||||
tertiaryTextFontSize = 10
|
||||
asideTextFontSize = 8
|
||||
break;
|
||||
|
||||
case Theme.FontSizeS:
|
||||
secondaryAdditionalTextSize = 16
|
||||
primaryTextFontSize = 14
|
||||
secondaryTextFontSize = 13
|
||||
additionalTextSize = 12
|
||||
tertiaryTextFontSize = 11
|
||||
asideTextFontSize = 9
|
||||
break;
|
||||
|
||||
case Theme.FontSizeM:
|
||||
secondaryAdditionalTextSize = 17
|
||||
primaryTextFontSize = 15
|
||||
secondaryTextFontSize = 14
|
||||
additionalTextSize = 13
|
||||
tertiaryTextFontSize = 12
|
||||
asideTextFontSize = 10
|
||||
break;
|
||||
|
||||
case Theme.FontSizeL:
|
||||
secondaryAdditionalTextSize = 18
|
||||
primaryTextFontSize = 16
|
||||
secondaryTextFontSize = 15
|
||||
additionalTextSize = 14
|
||||
tertiaryTextFontSize = 13
|
||||
asideTextFontSize = 11
|
||||
break;
|
||||
|
||||
case Theme.FontSizeXL:
|
||||
secondaryAdditionalTextSize = 19
|
||||
primaryTextFontSize = 17
|
||||
secondaryTextFontSize = 16
|
||||
additionalTextSize = 15
|
||||
tertiaryTextFontSize = 14
|
||||
asideTextFontSize = 12
|
||||
break;
|
||||
|
||||
case Theme.FontSizeXXL:
|
||||
secondaryAdditionalTextSize = 20
|
||||
primaryTextFontSize = 18
|
||||
secondaryTextFontSize = 17
|
||||
additionalTextSize = 16
|
||||
tertiaryTextFontSize = 15
|
||||
asideTextFontSize = 13
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Style compat
|
||||
readonly property string assetPath: Qt.resolvedUrl("../../../../../imports/assets/")
|
||||
function png(name) {
|
||||
return assetPath + "png/" + name + ".png"
|
||||
}
|
||||
function svg(name) {
|
||||
return assetPath + "icons/" + name + ".svg"
|
||||
}
|
||||
function emoji(name) {
|
||||
return "qrc:/StatusQ/src/assets/twemoji/svg/" + name + ".svg"
|
||||
}
|
||||
function gif(name) {
|
||||
return assetPath + "gif/" + name + ".gif"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,101 +5,6 @@ QtObject {
|
|||
|
||||
property string name
|
||||
|
||||
property var baseFont: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Regular.otf"
|
||||
}
|
||||
|
||||
property var monoFont: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Regular.otf"
|
||||
}
|
||||
|
||||
property var codeFont: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-Regular.ttf"
|
||||
}
|
||||
|
||||
readonly property QtObject _d: QtObject {
|
||||
// specific font variants should not be accessed directly
|
||||
|
||||
// Inter font variants
|
||||
property var baseFontThin: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Thin.otf"
|
||||
}
|
||||
|
||||
property var baseFontExtraLight: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-ExtraLight.otf"
|
||||
}
|
||||
|
||||
property var baseFontLight: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Light.otf"
|
||||
}
|
||||
|
||||
property var baseFontMedium: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Medium.otf"
|
||||
}
|
||||
|
||||
property var baseFontBold: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Bold.otf"
|
||||
}
|
||||
|
||||
property var baseFontExtraBold: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-ExtraBold.otf"
|
||||
}
|
||||
|
||||
property var baseFontBlack: FontLoader {
|
||||
source: "../../../assets/fonts/Inter/Inter-Black.otf"
|
||||
}
|
||||
|
||||
// Inter Status font variants
|
||||
property var monoFontThin: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Thin.otf"
|
||||
}
|
||||
|
||||
property var monoFontExtraLight: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraLight.otf"
|
||||
}
|
||||
|
||||
property var monoFontLight: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Light.otf"
|
||||
}
|
||||
|
||||
property var monoFontMedium: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Medium.otf"
|
||||
}
|
||||
|
||||
property var monoFontBold: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Bold.otf"
|
||||
}
|
||||
|
||||
property var monoFontExtraBold: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraBold.otf"
|
||||
}
|
||||
|
||||
property var monoFontBlack: FontLoader {
|
||||
source: "../../../assets/fonts/InterStatus/InterStatus-Black.otf"
|
||||
}
|
||||
|
||||
// Roboto font variants
|
||||
property var codeFontThin: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-Thin.ttf"
|
||||
}
|
||||
|
||||
property var codeFontExtraLight: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-ExtraLight.ttf"
|
||||
}
|
||||
|
||||
property var codeFontLight: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-Light.ttf"
|
||||
}
|
||||
|
||||
property var codeFontMedium: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-Medium.ttf"
|
||||
}
|
||||
|
||||
property var codeFontBold: FontLoader {
|
||||
source: "../../../assets/fonts/RobotoMono/RobotoMono-Bold.ttf"
|
||||
}
|
||||
}
|
||||
|
||||
property color black: Qt.rgba(0, 0, 0)
|
||||
property color white: Qt.rgba(1, 1, 1)
|
||||
property color transparent: "#00000000"
|
||||
|
@ -113,10 +18,6 @@ QtObject {
|
|||
property color dropShadow2
|
||||
property color backdropColor: getColor('black', 0.4)
|
||||
|
||||
function hoverColor(normalColor) {
|
||||
return theme.name === "light" ? Qt.darker(normalColor, 1.2) : Qt.lighter(normalColor, 1.2)
|
||||
}
|
||||
|
||||
property color baseColor1
|
||||
property color baseColor2
|
||||
property color baseColor3
|
||||
|
@ -191,6 +92,17 @@ QtObject {
|
|||
|
||||
property color blockProgressBarColor
|
||||
|
||||
// Style compat
|
||||
property color background
|
||||
property color backgroundHover: baseColor2
|
||||
property color border: baseColor2
|
||||
property color textColor: directColor1
|
||||
property color secondaryText: baseColor1
|
||||
property color separator
|
||||
property color darkGrey
|
||||
property color secondaryBackground: primaryColor2
|
||||
property color secondaryMenuBackground
|
||||
|
||||
property QtObject statusAppLayout: QtObject {
|
||||
property color backgroundColor
|
||||
property color rightPanelBackgroundColor
|
||||
|
@ -319,6 +231,10 @@ QtObject {
|
|||
return actualColor
|
||||
}
|
||||
|
||||
function hoverColor(normalColor) {
|
||||
return theme.name === "light" ? Qt.darker(normalColor, 1.2) : Qt.lighter(normalColor, 1.2)
|
||||
}
|
||||
|
||||
function getColor(name, alpha) {
|
||||
if(StatusColors.colors[name])
|
||||
// It means name is just the key to find inside the specific `StatusColors` object
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import "./xss.js" as XSS
|
||||
|
||||
|
@ -189,7 +189,7 @@ QtObject {
|
|||
return `<style type="text/css">` +
|
||||
`img, a, del, code, blockquote { margin: 0; padding: 0; }` +
|
||||
`code {` +
|
||||
`font-family: ${Theme.palette.codeFont.name};` +
|
||||
`font-family: ${Theme.codeFont.name};` +
|
||||
`font-weight: 400;` +
|
||||
`font-size: 14;` +
|
||||
`padding: 2px 4px;` +
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -88,7 +88,6 @@ StatusModal {
|
|||
|
||||
StatusBaseText {
|
||||
text: qsTr("Preview")
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -103,7 +102,6 @@ StatusModal {
|
|||
y: 16
|
||||
text: root.color.toString()
|
||||
color: Theme.palette.white
|
||||
font.pixelSize: 15
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
@ -127,7 +128,7 @@ Row {
|
|||
StatusBaseText {
|
||||
id: headerTitle
|
||||
objectName: "headerTitle"
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: 17
|
||||
font.bold: true
|
||||
elide: statusImageWithTitle.titleElide
|
||||
|
@ -154,7 +155,7 @@ Row {
|
|||
StatusBaseText {
|
||||
id: headerSubTitle
|
||||
objectName: "headerSubTitle"
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: 15
|
||||
color:Theme.palette.baseColor1
|
||||
width: parent.width
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import utils 1.0
|
||||
import shared.popups 1.0
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import Qt.labs.platform 1.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
import StatusQ.Controls 0.1 as StatusQControls
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import shared.panels 1.0
|
||||
import shared.status 1.0
|
||||
import shared.controls.chat 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string pubKey: "0x123456"
|
||||
property string name: "Jotaro Kujo"
|
||||
property string image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
|
||||
|
||||
property bool isContact: true
|
||||
property bool isUser: false
|
||||
property bool isVisible: true
|
||||
|
||||
property bool showCheckbox: true
|
||||
property bool clickable: true
|
||||
property bool isChecked: false
|
||||
property bool isHovered: false
|
||||
property var onItemChecked: (function(pubKey, itemChecked) { console.log(pubKey, itemChecked) })
|
||||
|
||||
property var onContactClicked
|
||||
|
||||
visible: isVisible && (isContact || isUser)
|
||||
height: visible ? 64 : 0
|
||||
border.width: 0
|
||||
radius: Style.current.radius
|
||||
color: isHovered ? Style.current.backgroundHover : Style.current.transparent
|
||||
|
||||
UserImage {
|
||||
id: accountImage
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: Style.current.padding
|
||||
|
||||
pubkey: root.pubKey
|
||||
name: root.name
|
||||
image: root.image
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: usernameText
|
||||
text: name
|
||||
elide: Text.ElideRight
|
||||
anchors.right: assetCheck.visible ? assetCheck.left : parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
font.pixelSize: 17
|
||||
anchors.top: accountImage.top
|
||||
anchors.topMargin: 10
|
||||
anchors.left: accountImage.right
|
||||
anchors.leftMargin: Style.current.padding
|
||||
}
|
||||
|
||||
StatusQControls.StatusCheckBox {
|
||||
id: assetCheck
|
||||
visible: showCheckbox && !isUser
|
||||
anchors.top: accountImage.top
|
||||
anchors.topMargin: 6
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
checked: isChecked
|
||||
onClicked: {
|
||||
isChecked = !isChecked
|
||||
onItemChecked(pubKey, isChecked)
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
visible: isUser
|
||||
text: qsTr("Admin")
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
font.pixelSize: 15
|
||||
color: Style.current.darkGrey
|
||||
anchors.top: accountImage.top
|
||||
anchors.topMargin: 10
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
enabled: root.clickable || root.showCheckbox
|
||||
hoverEnabled: root.clickable || root.showCheckbox
|
||||
onEntered: root.isHovered = true
|
||||
onExited: root.isHovered = false
|
||||
onClicked: {
|
||||
if (typeof root.onContactClicked !== "function") {
|
||||
return assetCheck.clicked()
|
||||
}
|
||||
root.onContactClicked()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared 1.0
|
||||
|
@ -12,14 +14,14 @@ Rectangle {
|
|||
radius: 8
|
||||
width: children[0].width + 10
|
||||
height: 32
|
||||
border.color: Style.current.border
|
||||
color: Style.current.transparent
|
||||
border.color: Theme.palette.border
|
||||
color: Theme.palette.transparent
|
||||
|
||||
StyledText {
|
||||
id: suggestedChannelText
|
||||
text: "#" + channel
|
||||
font.weight: Font.Medium
|
||||
color: Style.current.blue;
|
||||
color: Theme.palette.primaryColor1;
|
||||
anchors.top: parent.top;
|
||||
anchors.topMargin: 5;
|
||||
anchors.left: parent.left;
|
||||
|
|
|
@ -37,11 +37,11 @@ Item {
|
|||
radius: 100
|
||||
spacing: 2
|
||||
|
||||
icon.width: Style.current.primaryTextFontSize + 5
|
||||
icon.height: Style.current.primaryTextFontSize + 5
|
||||
verticalPadding: Style.current.halfPadding
|
||||
horizontalPadding: Style.current.smallPadding
|
||||
font.pixelSize: Style.current.primaryTextFontSize
|
||||
icon.width: Theme.primaryTextFontSize + 5
|
||||
icon.height: Theme.primaryTextFontSize + 5
|
||||
verticalPadding: Theme.halfPadding
|
||||
horizontalPadding: Theme.smallPadding
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: DropShadow {
|
||||
|
@ -56,7 +56,7 @@ Item {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: Style.current.smallPadding
|
||||
spacing: Theme.smallPadding
|
||||
|
||||
AnchorButton {
|
||||
visible: root.mentionsCount > 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick 2.15
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
@ -17,7 +17,7 @@ Item {
|
|||
|
||||
Image {
|
||||
id: waveImg
|
||||
source: Style.png("chat/wave")
|
||||
source: Theme.png("chat/wave")
|
||||
width: 80
|
||||
height: 80
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@ -30,7 +30,7 @@ Item {
|
|||
anchors.top: waveImg.bottom
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.topMargin: Theme.padding
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width / 1.3
|
||||
color: Theme.palette.directColor1
|
||||
|
@ -53,7 +53,7 @@ Item {
|
|||
visible: !isUserAdded
|
||||
text: qsTr("Add to contacts")
|
||||
anchors.top: contactText2.bottom
|
||||
anchors.topMargin: Style.current.smallPadding
|
||||
anchors.topMargin: Theme.smallPadding
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
onClicked: addContactClicked()
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import utils 1.0
|
||||
import shared 1.0
|
||||
|
@ -8,6 +8,7 @@ import shared.panels 1.0
|
|||
import shared.controls.chat 1.0
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
Rectangle {
|
||||
property string contactPubKey
|
||||
|
@ -24,14 +25,14 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
border.width: 0
|
||||
radius: Style.current.radius
|
||||
color: isHovered ? Style.current.backgroundHover : Style.current.transparent
|
||||
radius: Theme.radius
|
||||
color: isHovered ? Theme.palette.backgroundHover : Theme.palette.transparent
|
||||
|
||||
UserImage {
|
||||
id: accountImage
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.leftMargin: Theme.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
name: contactName
|
||||
|
@ -45,11 +46,11 @@ Rectangle {
|
|||
elide: Text.ElideRight
|
||||
font.pixelSize: 17
|
||||
anchors.top: accountImage.top
|
||||
anchors.topMargin: Style.current.smallPadding
|
||||
anchors.topMargin: Theme.smallPadding
|
||||
anchors.left: accountImage.right
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.leftMargin: Theme.padding
|
||||
anchors.right: buttons.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.rightMargin: Theme.padding
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
|
@ -59,7 +60,7 @@ Rectangle {
|
|||
AcceptRejectOptionsButtonsPanel {
|
||||
id: buttons
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.rightMargin: Theme.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onAcceptClicked: container.acceptClicked()
|
||||
onDeclineClicked: container.declineClicked()
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import shared 1.0
|
||||
import shared.panels 1.0
|
||||
import shared.popups 1.0
|
||||
|
@ -19,7 +22,7 @@ Item {
|
|||
objectName: "emptyChatPanelImage"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: Style.png("chat/chat@2x")
|
||||
source: Theme.png("chat/chat@2x")
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -33,7 +36,7 @@ Item {
|
|||
id: shareKeyLink
|
||||
text: qsTr("Share your chat key")
|
||||
font.pixelSize: 15
|
||||
color: Style.current.blue
|
||||
color: Theme.palette.primaryColor1
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
@ -53,7 +56,7 @@ Item {
|
|||
id: orText
|
||||
text: qsTr("or")
|
||||
font.pixelSize: 15
|
||||
color: Style.current.secondaryText
|
||||
color: Theme.palette.secondaryText
|
||||
anchors.left: shareKeyLink.right
|
||||
anchors.leftMargin: 2
|
||||
anchors.bottom: shareKeyLink.bottom
|
||||
|
@ -63,7 +66,7 @@ Item {
|
|||
id: inviteLink
|
||||
text: qsTr("invite")
|
||||
font.pixelSize: 15
|
||||
color: Style.current.blue
|
||||
color: Theme.palette.primaryColor1
|
||||
anchors.left: orText.right
|
||||
anchors.leftMargin: 2
|
||||
anchors.bottom: shareKeyLink.bottom
|
||||
|
@ -88,7 +91,7 @@ Item {
|
|||
StyledText {
|
||||
text: qsTr("friends to start messaging in Status")
|
||||
font.pixelSize: 15
|
||||
color: Style.current.secondaryText
|
||||
color: Theme.palette.secondaryText
|
||||
anchors.horizontalCenter: walkieTalkieImage.horizontalCenter
|
||||
anchors.top: links.bottom
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
@ -56,21 +56,21 @@ Item {
|
|||
RowLayout {
|
||||
id: mainLayout
|
||||
anchors.fill: parent
|
||||
spacing: Style.current.padding
|
||||
spacing: Theme.padding
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 44
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.leftMargin: Style.current.halfPadding
|
||||
Layout.leftMargin: Theme.halfPadding
|
||||
color: Theme.palette.baseColor2
|
||||
radius: Style.current.radius
|
||||
radius: Theme.radius
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Style.current.halfPadding
|
||||
spacing: Theme.halfPadding
|
||||
StatusBaseText {
|
||||
id: label
|
||||
Layout.leftMargin: Style.current.padding
|
||||
Layout.leftMargin: Theme.padding
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
visible: text !== ""
|
||||
font.pixelSize: 15
|
||||
|
@ -105,7 +105,7 @@ Item {
|
|||
Layout.preferredHeight: 30
|
||||
implicitWidth: contentWidth
|
||||
orientation: ListView.Horizontal
|
||||
spacing: Style.current.halfPadding
|
||||
spacing: Theme.halfPadding
|
||||
interactive: false
|
||||
}
|
||||
|
||||
|
@ -124,8 +124,8 @@ Item {
|
|||
onCursorPositionChanged: {
|
||||
if (scrollView.contentX > cursorRectangle.x)
|
||||
scrollView.contentX = cursorRectangle.x;
|
||||
if (scrollView.contentX < ((cursorRectangle.x+Style.current.smallPadding)-scrollView.width) && ((cursorRectangle.x+Style.current.smallPadding) > scrollView.width))
|
||||
scrollView.contentX = (cursorRectangle.x-scrollView.width+Style.current.smallPadding);
|
||||
if (scrollView.contentX < ((cursorRectangle.x+Theme.smallPadding)-scrollView.width) && ((cursorRectangle.x+Theme.smallPadding) > scrollView.width))
|
||||
scrollView.contentX = (cursorRectangle.x-scrollView.width+Theme.smallPadding);
|
||||
}
|
||||
|
||||
cursorDelegate: StatusCursorDelegate {
|
||||
|
@ -191,7 +191,7 @@ Item {
|
|||
StatusBaseText {
|
||||
id: warningLabel
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
Layout.rightMargin: Style.current.padding
|
||||
Layout.rightMargin: Theme.padding
|
||||
visible: text !== ""
|
||||
font.pixelSize: 10
|
||||
color: Theme.palette.dangerColor1
|
||||
|
@ -231,9 +231,9 @@ Item {
|
|||
|
||||
parent: scrollView
|
||||
x: Math.min(parent.width, parent.contentWidth)
|
||||
y: parent.height + Style.current.halfPadding
|
||||
y: parent.height + Theme.halfPadding
|
||||
visible: edit.text !== "" && !forceHide
|
||||
padding: Style.current.halfPadding
|
||||
padding: Theme.halfPadding
|
||||
background: StatusDialogBackground {
|
||||
id: bg
|
||||
layer.enabled: true
|
||||
|
|
|
@ -2,6 +2,8 @@ import QtQuick 2.13
|
|||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
import shared 1.0
|
||||
import shared.panels 1.0
|
||||
|
@ -15,8 +17,8 @@ Repeater {
|
|||
signal suggestedMessageClicked(string channel)
|
||||
Item {
|
||||
anchors.top: index === 0 ? parent.top : parent.children[index - 1].bottom
|
||||
anchors.topMargin: index === 0 ? 0 : Style.current.padding
|
||||
width: parent.width - Style.current.padding
|
||||
anchors.topMargin: index === 0 ? 0 : Theme.padding
|
||||
width: parent.width - Theme.padding
|
||||
height: childrenRect.height
|
||||
|
||||
StyledText {
|
||||
|
@ -28,7 +30,7 @@ Repeater {
|
|||
Flow {
|
||||
width: parent.width
|
||||
anchors.top: sectionTitle.bottom
|
||||
anchors.topMargin: Style.current.smallPadding
|
||||
anchors.topMargin: Theme.smallPadding
|
||||
spacing: 10
|
||||
Repeater {
|
||||
model: modelData.channels
|
||||
|
|
|
@ -17,12 +17,13 @@
|
|||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtGraphicalEffects 1.13
|
||||
import QtQml.Models 2.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import QtQml.Models 2.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
@ -82,15 +83,15 @@ Rectangle {
|
|||
|
||||
z: parent.z + 100
|
||||
visible: !shouldHide && filter.length > 0 && suggestionsModel.count > 0
|
||||
height: Math.min(400, listView.contentHeight + Style.current.padding)
|
||||
height: Math.min(400, listView.contentHeight + Theme.padding)
|
||||
|
||||
opacity: visible ? 1.0 : 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation { }
|
||||
}
|
||||
|
||||
color: Style.current.background
|
||||
radius: Style.current.radius
|
||||
color: Theme.palette.background
|
||||
radius: Theme.radius
|
||||
border.width: 0
|
||||
layer.enabled: true
|
||||
layer.effect: DropShadow{
|
||||
|
@ -119,10 +120,10 @@ Rectangle {
|
|||
model: mentionsListDelegate
|
||||
keyNavigationEnabled: true
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: Style.current.halfPadding
|
||||
anchors.leftMargin: Style.current.halfPadding
|
||||
anchors.rightMargin: Style.current.halfPadding
|
||||
anchors.bottomMargin: Style.current.halfPadding
|
||||
anchors.topMargin: Theme.halfPadding
|
||||
anchors.leftMargin: Theme.halfPadding
|
||||
anchors.rightMargin: Theme.halfPadding
|
||||
anchors.bottomMargin: Theme.halfPadding
|
||||
Keys.priority: Keys.AfterItem
|
||||
Keys.forwardTo: container.inputField
|
||||
Keys.onPressed: {
|
||||
|
@ -189,17 +190,17 @@ Rectangle {
|
|||
delegate: Rectangle {
|
||||
id: itemDelegate
|
||||
objectName: model.name
|
||||
color: ListView.isCurrentItem ? Style.current.backgroundHover : Style.current.transparent
|
||||
color: ListView.isCurrentItem ? Theme.palette.backgroundHover : Theme.palette.transparent
|
||||
border.width: 0
|
||||
width: ListView.view.width
|
||||
height: 42
|
||||
radius: Style.current.radius
|
||||
radius: Theme.radius
|
||||
|
||||
UserImage {
|
||||
id: accountImage
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
anchors.leftMargin: Theme.smallPadding
|
||||
imageWidth: 32
|
||||
imageHeight: 32
|
||||
|
||||
|
@ -211,10 +212,10 @@ Rectangle {
|
|||
|
||||
StyledText {
|
||||
text: model[container.property.find(p => !!model[p])]
|
||||
color: Style.current.textColor
|
||||
color: Theme.palette.textColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: accountImage.right
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
anchors.leftMargin: Theme.smallPadding
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core 0.1
|
||||
|
@ -28,12 +29,12 @@ Item {
|
|||
StatusBaseText {
|
||||
id: titleText
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.topMargin: Theme.padding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.leftMargin: Theme.padding
|
||||
opacity: (root.width > 58) ? 1.0 : 0.0
|
||||
visible: (opacity > 0.1)
|
||||
font.pixelSize: Style.current.primaryTextFontSize
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
font.weight: Font.Medium
|
||||
color: Theme.palette.directColor1
|
||||
text: root.label
|
||||
|
@ -42,14 +43,14 @@ Item {
|
|||
StatusBaseText {
|
||||
id: communityMemberReevaluationInProgressText
|
||||
visible: root.communityMemberReevaluationStatus === Constants.CommunityMemberReevaluationStatus.InProgress
|
||||
height: visible ? implicitHeight : 0
|
||||
height: visible ? implicitHeight : 0
|
||||
anchors.top: titleText.bottom
|
||||
anchors.topMargin: visible ? Style.current.padding : 0
|
||||
anchors.topMargin: visible ? Theme.padding : 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.leftMargin: Theme.padding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
font.pixelSize: Style.current.secondaryTextFontSize
|
||||
anchors.rightMargin: Theme.padding
|
||||
font.pixelSize: Theme.secondaryTextFontSize
|
||||
color: Theme.palette.directColor1
|
||||
text: qsTr("Member re-evaluation in progress...")
|
||||
wrapMode: Text.WordWrap
|
||||
|
@ -67,11 +68,11 @@ Item {
|
|||
Item {
|
||||
anchors {
|
||||
top: communityMemberReevaluationInProgressText.bottom
|
||||
topMargin: Style.current.padding
|
||||
topMargin: Theme.padding
|
||||
left: parent.left
|
||||
leftMargin: Style.current.halfPadding
|
||||
leftMargin: Theme.halfPadding
|
||||
right: parent.right
|
||||
rightMargin: Style.current.halfPadding
|
||||
rightMargin: Theme.halfPadding
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
|
@ -84,7 +85,7 @@ Item {
|
|||
clip: false
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: Style.current.bigPadding
|
||||
anchors.bottomMargin: Theme.bigPadding
|
||||
displayMarginEnd: anchors.bottomMargin
|
||||
|
||||
model: SortFilterProxyModel {
|
||||
|
@ -143,9 +144,9 @@ Item {
|
|||
height: 24
|
||||
StatusBaseText {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.leftMargin: Theme.padding
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: Style.current.additionalTextSize
|
||||
font.pixelSize: Theme.additionalTextSize
|
||||
color: Theme.palette.baseColor1
|
||||
text: {
|
||||
switch(parseInt(section)) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQml.Models 2.14
|
||||
import QtGraphicalEffects 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQml.Models 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -55,7 +55,7 @@ StatusDialog {
|
|||
text: qsTr("Pinned messages will appear here.")
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: Style.current.secondaryText
|
||||
color: Theme.palette.secondaryText
|
||||
}
|
||||
|
||||
ButtonGroup {
|
||||
|
@ -159,9 +159,9 @@ StatusDialog {
|
|||
StatusFlatRoundButton {
|
||||
id: unpinButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
anchors.topMargin: Theme.bigPadding
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.rightMargin: Theme.bigPadding
|
||||
z: mouseArea.z + 1
|
||||
width: 32
|
||||
height: 32
|
||||
|
@ -178,7 +178,7 @@ StatusDialog {
|
|||
id: radio
|
||||
visible: root.messageToPin
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.bigPadding
|
||||
anchors.rightMargin: Theme.bigPadding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
ButtonGroup.group: pinButtonGroup
|
||||
onCheckedChanged: { // NB this should be `onToggled` but MouseArea above handles the whole delegate
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick 2.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
QtObject {
|
||||
|
@ -17,7 +20,7 @@ QtObject {
|
|||
readonly property bool isPinMessageAllowedForMembers: messageModule ? messageModule.isPinMessageAllowedForMembers : false
|
||||
readonly property string chatId: messageModule ? messageModule.getChatId() : ""
|
||||
readonly property int chatType: messageModule ? messageModule.chatType : Constants.chatType.unknown
|
||||
readonly property string chatColor: messageModule ? messageModule.chatColor : Style.current.blue
|
||||
readonly property string chatColor: messageModule ? messageModule.chatColor : Theme.palette.primaryColor1
|
||||
readonly property string chatIcon: messageModule ? messageModule.chatIcon : ""
|
||||
readonly property bool keepUnread: messageModule ? messageModule.keepUnread : false
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import SortFilterProxyModel 0.2
|
|||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
import AppLayouts.Profile.stores 1.0
|
||||
import AppLayouts.Wallet.stores 1.0 as WalletStore
|
||||
|
@ -42,12 +43,13 @@ QtObject {
|
|||
property var assetsModel: SortFilterProxyModel {
|
||||
sourceModel: communitiesModuleInst.tokenList
|
||||
|
||||
proxyRoles: ExpressionRole {
|
||||
proxyRoles: FastExpressionRole {
|
||||
function tokenIcon(symbol) {
|
||||
return Constants.tokenIcon(symbol)
|
||||
}
|
||||
name: "iconSource"
|
||||
expression: !!model.icon ? model.icon : tokenIcon(model.symbol)
|
||||
expectedRoles: ["icon", "symbol"]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,23 +57,26 @@ QtObject {
|
|||
sourceModel: communitiesModuleInst.collectiblesModel
|
||||
|
||||
proxyRoles: [
|
||||
ExpressionRole {
|
||||
FastExpressionRole {
|
||||
function collectibleIcon(icon) {
|
||||
return !!icon ? icon : Style.png("tokens/DEFAULT-TOKEN")
|
||||
return !!icon ? icon : Theme.png("tokens/DEFAULT-TOKEN")
|
||||
}
|
||||
name: "iconSource"
|
||||
expression: collectibleIcon(model.icon)
|
||||
name: "iconSource"
|
||||
expression: collectibleIcon(model.icon)
|
||||
expectedRoles: ["icon"]
|
||||
},
|
||||
ExpressionRole {
|
||||
name: "collectionUid"
|
||||
expression: model.key
|
||||
FastExpressionRole {
|
||||
name: "collectionUid"
|
||||
expression: model.key
|
||||
expectedRoles: ["key"]
|
||||
},
|
||||
ExpressionRole {
|
||||
FastExpressionRole {
|
||||
function collectibleIcon(icon) {
|
||||
return !!icon ? icon : Style.png("tokens/DEFAULT-TOKEN")
|
||||
return !!icon ? icon : Theme.png("tokens/DEFAULT-TOKEN")
|
||||
}
|
||||
name: "collectionImageUrl"
|
||||
expression: collectibleIcon(model.icon)
|
||||
name: "collectionImageUrl"
|
||||
expression: collectibleIcon(model.icon)
|
||||
expectedRoles: ["icon"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ Item {
|
|||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.margins: Style.current.smallPadding
|
||||
Layout.margins: Theme.smallPadding
|
||||
Layout.preferredHeight: chatInputItem.height
|
||||
|
||||
Item {
|
||||
|
@ -399,7 +399,7 @@ Item {
|
|||
width: chatInput.textInput.width
|
||||
height: chatInput.textInput.height
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: (2*Style.current.bigPadding)
|
||||
anchors.leftMargin: (2*Theme.bigPadding)
|
||||
visible: (!!root.viewAndPostHoldingsModel && (root.viewAndPostHoldingsModel.count > 0)
|
||||
&& !root.amISectionAdmin && !root.canPost)
|
||||
assetsModel: root.rootStore.assetsModel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -24,7 +24,7 @@ Item {
|
|||
property RootStore rootStore
|
||||
property var chatContentModule: root.rootStore.currentChatContentModule() || null
|
||||
property var emojiPopup
|
||||
property int padding: Style.current.halfPadding
|
||||
property int padding: Theme.halfPadding
|
||||
|
||||
signal searchButtonClicked()
|
||||
signal displayEditChannelPopup(string chatId,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.15
|
||||
import QtQml 2.15
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Dialogs 1.3
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
@ -245,7 +245,7 @@ Item {
|
|||
ChatAnchorButtonsPanel {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.rightMargin: Theme.padding
|
||||
|
||||
mentionsCount: d.chatDetails ? d.chatDetails.notificationCount : 0
|
||||
recentMessagesButtonVisible: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.13
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -45,15 +45,15 @@ Item {
|
|||
ColumnLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: Style.current.smallPadding
|
||||
topMargin: Theme.smallPadding
|
||||
}
|
||||
spacing: Style.current.halfPadding
|
||||
spacing: Theme.halfPadding
|
||||
|
||||
// Chat headline row
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Style.current.padding
|
||||
Layout.rightMargin: Style.current.padding
|
||||
Layout.leftMargin: Theme.padding
|
||||
Layout.rightMargin: Theme.padding
|
||||
|
||||
StatusNavigationPanelHeadline {
|
||||
objectName: "ContactsColumnView_MessagesHeadline"
|
||||
|
@ -94,8 +94,8 @@ Item {
|
|||
SearchBox {
|
||||
id: searchInput
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Style.current.padding
|
||||
Layout.rightMargin: Style.current.padding
|
||||
Layout.leftMargin: Theme.padding
|
||||
Layout.rightMargin: Theme.padding
|
||||
Layout.preferredHeight: 36
|
||||
maximumHeight: 36
|
||||
leftPadding: 10
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQml.Models 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQml.Models 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
@ -59,8 +59,8 @@ Page {
|
|||
id: membersSelector
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.leftMargin: Style.current.halfPadding
|
||||
Layout.rightMargin: Style.current.halfPadding
|
||||
Layout.leftMargin: Theme.halfPadding
|
||||
Layout.rightMargin: Theme.halfPadding
|
||||
rootStore: root.rootStore
|
||||
|
||||
function createChat() {
|
||||
|
@ -122,14 +122,14 @@ Page {
|
|||
ColumnLayout {
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: Style.current.bigPadding
|
||||
bottomMargin: Style.current.padding
|
||||
leftMargin: Style.current.halfPadding
|
||||
topMargin: Theme.bigPadding
|
||||
bottomMargin: Theme.padding
|
||||
leftMargin: Theme.halfPadding
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.leftMargin: Style.current.halfPadding
|
||||
Layout.leftMargin: Theme.halfPadding
|
||||
visible: contactsList.visible
|
||||
font.pixelSize: 15
|
||||
text: qsTr("Contacts")
|
||||
|
@ -177,7 +177,7 @@ Page {
|
|||
|
||||
StatusBaseText {
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(553, parent.width - 2 * Style.current.padding)
|
||||
width: Math.min(553, parent.width - 2 * Theme.padding)
|
||||
visible: root.rootStore.contactsModel.count === 0
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
@ -113,7 +113,7 @@ StatusSectionLayout {
|
|||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 38
|
||||
spacing: Style.current.bigPadding
|
||||
spacing: Theme.bigPadding
|
||||
|
||||
SearchBox {
|
||||
id: searcher
|
||||
|
|
|
@ -49,7 +49,7 @@ Control {
|
|||
}
|
||||
|
||||
background: Rectangle {
|
||||
radius: Style.current.radius
|
||||
radius: Theme.radius
|
||||
color: Theme.palette.statusListItem.backgroundColor
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ StatusFlowSelector {
|
|||
!membersSelectorPanel.visible
|
||||
|
||||
title: qsTr("To")
|
||||
icon: Style.svg("member")
|
||||
icon: Theme.svg("member")
|
||||
flowSpacing: addressesSelectorPanel.visible || membersSelectorPanel.visible
|
||||
? 12 : 6
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ StatusFlowSelector {
|
|||
placeholderItem.visible: repeater.count === 0
|
||||
|
||||
title: qsTr("What")
|
||||
icon: Style.svg("token")
|
||||
icon: Theme.svg("token")
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
|
|
@ -15,7 +15,7 @@ Rectangle {
|
|||
property bool isEditMode
|
||||
property bool isDirty
|
||||
|
||||
implicitWidth: hintRow.implicitWidth + 2*Style.current.padding
|
||||
implicitWidth: hintRow.implicitWidth + 2*Theme.padding
|
||||
implicitHeight: 40
|
||||
color: Theme.palette.baseColor2
|
||||
radius: height/2
|
||||
|
|
|
@ -76,7 +76,7 @@ Item {
|
|||
|
||||
readonly property int filterItemsHeight: 36
|
||||
readonly property int filterPopupWidth: 233
|
||||
readonly property int padding: Style.current.halfPadding
|
||||
readonly property int padding: Theme.halfPadding
|
||||
|
||||
// Internal management properties
|
||||
property bool isFilterOptionVisible: false
|
||||
|
|
|
@ -23,7 +23,7 @@ Control {
|
|||
implicitHeight: Math.max(titleText.implicitHeight,
|
||||
feeText.implicitHeight)
|
||||
|
||||
readonly property int halfWidth: (width - Style.current.padding) / 2
|
||||
readonly property int halfWidth: (width - Theme.padding) / 2
|
||||
|
||||
StatusBaseText {
|
||||
id: titleText
|
||||
|
@ -35,7 +35,7 @@ Control {
|
|||
maximumLineCount: 2
|
||||
lineHeight: 22
|
||||
lineHeightMode: Text.FixedHeight
|
||||
font.pixelSize: Style.current.primaryTextFontSize
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
|
@ -51,14 +51,14 @@ Control {
|
|||
|
||||
textFormat: Text.RichText
|
||||
text: `<span style="color:${baseColor};` +
|
||||
`font-size:${Style.current.tertiaryTextFontSize}px;">` +
|
||||
`font-size:${Theme.tertiaryTextFontSize}px;">` +
|
||||
`${qsTr("Max.")}</span> ${SQUtils.StringUtils.escapeHtml(root.feeText)}`
|
||||
|
||||
visible: root.feeText !== ""
|
||||
horizontalAlignment: Text.AlignRight
|
||||
color: root.errorFee ? Theme.palette.dangerColor1 : baseColor
|
||||
|
||||
font.pixelSize: Style.current.primaryTextFontSize
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
wrapMode: Text.Wrap
|
||||
maximumLineCount: 2
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@ Control {
|
|||
component Separator: Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
|
||||
color: Theme.palette.baseColor2
|
||||
}
|
||||
|
||||
component ErrorText: StatusBaseText {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.halfPadding
|
||||
Layout.topMargin: Theme.halfPadding
|
||||
horizontalAlignment: Text.AlignRight
|
||||
|
||||
font.pixelSize: Theme.tertiaryTextFontSize
|
||||
|
@ -61,7 +61,7 @@ Control {
|
|||
id: feeTotalRow
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
|
||||
title: qsTr("Total")
|
||||
highlightFee: true
|
||||
|
@ -73,7 +73,7 @@ Control {
|
|||
}
|
||||
|
||||
StatusBaseText {
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
Layout.fillWidth: true
|
||||
|
||||
visible: accountSelector.visible
|
||||
|
@ -88,7 +88,7 @@ Control {
|
|||
id: accountSelector
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.halfPadding
|
||||
Layout.topMargin: Theme.halfPadding
|
||||
|
||||
visible: root.showAccountsSelector
|
||||
forceError: accountErrorText.visible
|
||||
|
|
|
@ -18,20 +18,20 @@ Control {
|
|||
spacing: 0
|
||||
|
||||
StatusBaseText {
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
Layout.fillWidth: true
|
||||
|
||||
visible: root.accountName !== ""
|
||||
color: Theme.palette.baseColor1
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: Style.current.primaryTextFontSize
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
maximumLineCount: 2
|
||||
text: qsTr("via %1").arg(root.accountName)
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 1
|
||||
|
||||
|
@ -41,7 +41,7 @@ Control {
|
|||
FeeRow {
|
||||
id: feeTotalRow
|
||||
|
||||
Layout.topMargin: Style.current.padding
|
||||
Layout.topMargin: Theme.padding
|
||||
Layout.fillWidth: true
|
||||
|
||||
title: qsTr("Total")
|
||||
|
@ -52,7 +52,7 @@ Control {
|
|||
id: errorText
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.current.halfPadding
|
||||
Layout.topMargin: Theme.halfPadding
|
||||
|
||||
color: Theme.palette.dangerColor1
|
||||
font.pixelSize: Theme.tertiaryTextFontSize + 1
|
||||
|
|
|
@ -31,7 +31,7 @@ Control {
|
|||
property alias bgCornerRadius: background.radius
|
||||
property string icon: "warning"
|
||||
|
||||
font.family: Theme.palette.baseFont.name
|
||||
font.family: Theme.baseFont.name
|
||||
font.pixelSize: 12
|
||||
|
||||
horizontalPadding: 8
|
||||
|
|
|
@ -95,7 +95,7 @@ StatusListView {
|
|||
|
||||
name: model.name
|
||||
shortName: model.shortName ?? ""
|
||||
iconSource: model.iconSource ? model.iconSource : Style.png("tokens/DEFAULT-TOKEN")
|
||||
iconSource: model.iconSource ? model.iconSource : Theme.png("tokens/DEFAULT-TOKEN")
|
||||
showSubItemsIcon: !!model.subItems && model.subItems.count > 0
|
||||
selected: root.checkedKeys.includes(model.key)
|
||||
amount: {
|
||||
|
@ -163,7 +163,7 @@ StatusListView {
|
|||
id: footerComponent
|
||||
|
||||
Item {
|
||||
width: ListView.view ? ListView.view.width - Style.current.smallPadding : 0
|
||||
width: ListView.view ? ListView.view.width - Theme.smallPadding : 0
|
||||
height: d.sectionHeight
|
||||
|
||||
Loader {
|
||||
|
@ -204,7 +204,7 @@ StatusListView {
|
|||
QtObject {
|
||||
id: d
|
||||
|
||||
readonly property int padding: Style.current.halfPadding
|
||||
readonly property int padding: Theme.halfPadding
|
||||
readonly property int sectionHeight: 34
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ StatusListView {
|
|||
}
|
||||
|
||||
StatusBaseText {
|
||||
anchors.leftMargin: Style.current.halfPadding
|
||||
anchors.leftMargin: Theme.halfPadding
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width - anchors.leftMargin
|
||||
|
|
|
@ -60,7 +60,7 @@ Control {
|
|||
height: Math.min(root.maximumListHeight,
|
||||
d.delegateHeight * root.count)
|
||||
|
||||
radius: Style.current.radius
|
||||
radius: Theme.radius
|
||||
color: Theme.palette.statusListItem.backgroundColor
|
||||
|
||||
StatusListView {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.13
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Core.Utils 0.1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue