Commit 2ee37ce4 authored by Karel Slaný's avatar Karel Slaný
Browse files

Display account names in italics when using ephemeral accounts.

parent 0a29718d
......@@ -141,7 +141,7 @@ Component {
width: parent.width
height: parent.height
anchors.fill: parent
Rectangle {
Rectangle { // account description line
id: accountHeader
color: datovkaPalette.highlight
Layout.fillWidth: true
......@@ -165,6 +165,7 @@ Component {
text: rAcntName
color: datovkaPalette.text
font.bold: true
font.italic: !rStoreIntoDb // Ephemeral accounts use italics.
}
Text {
id: uName
......@@ -172,6 +173,7 @@ Component {
text: "(" + rUserName + ")"
color: datovkaPalette.text
font.pointSize: textFontSizeSmall
font.italic: !rStoreIntoDb // Ephemeral accounts use italics.
renderType: Text.NativeRendering
}
}
......@@ -179,7 +181,7 @@ Component {
id: accountInfo
anchors.left: parent.left
anchors.leftMargin: defaultMargin
text: rTestAccount + ", " + rstoreToDisk
text: rTestAccount
color: datovkaPalette.text
font.pointSize: textFontSizeSmall
renderType: Text.NativeRendering
......@@ -226,7 +228,7 @@ Component {
color: datovkaPalette.mid
}
}
Rectangle {
Rectangle { // received messages line
color: datovkaPalette.base
Layout.fillWidth: true
Layout.fillHeight: true
......@@ -292,7 +294,7 @@ Component {
color: datovkaPalette.mid
}
}
Rectangle {
Rectangle { // sent messages line
color: datovkaPalette.base
Layout.fillWidth: true
Layout.fillHeight: true
......
......@@ -550,7 +550,7 @@ QHash<int, QByteArray> AccountListModel::roleNames(void) const
roles[ROLE_ACCOUNT_NAME] = "rAcntName";
roles[ROLE_USER_NAME] = "rUserName";
roles[ROLE_TEST_ACCOUNT] = "rTestAccount";
roles[ROLE_USE_DB] = "rstoreToDisk";
roles[ROLE_STORE_INTO_DB] = "rStoreIntoDb";
roles[ROLE_RECEIVED_UNREAD] = "rRcvdUnread";
roles[ROLE_RECEIVED_TOTAL] = "rRcvdTotal";
roles[ROLE_SENT_UNREAD] = "rSntUnread";
......@@ -588,9 +588,8 @@ QVariant AccountListModel::data(const QModelIndex &index, int role) const
return acntData.isTestAccount() ?
tr("Test account") : tr("Standard account");
break;
case ROLE_USE_DB:
return acntData.storeToDisk() ?
tr("local storage") : tr("data in memory");
case ROLE_STORE_INTO_DB:
return acntData.storeToDisk();
break;
case ROLE_RECEIVED_UNREAD:
return acntData._receivedNew;
......
......@@ -146,7 +146,7 @@ public:
ROLE_ACCOUNT_NAME = Qt::UserRole,
ROLE_USER_NAME,
ROLE_TEST_ACCOUNT,
ROLE_USE_DB,
ROLE_STORE_INTO_DB,
ROLE_RECEIVED_UNREAD,
ROLE_RECEIVED_TOTAL,
ROLE_SENT_UNREAD,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment