diff --git a/conversationitemdelegate.cpp b/conversationitemdelegate.cpp index 3909b069404236510a54b33990e78c65ae122097..e1c4a85aeae58bb505d78cf0f1d7c7e36136d544 100644 --- a/conversationitemdelegate.cpp +++ b/conversationitemdelegate.cpp @@ -296,20 +296,23 @@ ConversationItemDelegate::paintRingInviteConversationItem(QPainter* painter, const QModelIndex& index) const { QFont font(painter->font()); - font.setPointSize(fontSize_); QPen pen(painter->pen()); painter->setPen(pen); auto leftMargin = dx_ + sizeImage_ + dx_; auto rightMargin = dx_; + + auto scalingRatio = MainWindow::instance().getCurrentScalingRatio(); + font.setPointSize(scalingRatio > 1.0 ? fontSize_ - 2 : fontSize_); + if (option.state & QStyle::State_MouseOver) { - auto scalingRatio = MainWindow::instance().getCurrentScalingRatio(); if (scalingRatio > 1.0) { rightMargin = infoTextWidth_ + 12 - dx_ * 2; } else { rightMargin = infoTextWidth_ - dx_ * 2; } } + auto topMargin = 4; auto bottomMargin = 8; diff --git a/web/chatview.css b/web/chatview.css index aaf6a53069c43f6f64712a21f9ebfd3b59f2ca62..daedf44ab5c1f19349335c4824858cbbda668b28 100644 --- a/web/chatview.css +++ b/web/chatview.css @@ -118,7 +118,7 @@ body { display: flex; cursor: pointer; align-self: center; - border-radius: 9px; + border-radius: 16px; } .nav-button.deactivated { @@ -128,7 +128,7 @@ body { padding: 2px; align-self: center; display: flex; - border-radius: 9px; + border-radius: 16px; cursor: auto; } @@ -187,26 +187,25 @@ body { /** Invitation bar */ #invitation { - visibility: hidden; - background: var(--bg-color); - position: absolute; - width: 100%; - padding-bottom: 10px; + visibility: hidden; + background: var(--bg-color); + position: absolute; + width: 100%; + padding-bottom: 10px; - /* hairline */ - border-bottom: var(--hairline-thickness) solid var(--hairline-color); + /* hairline */ + border-bottom: var(--hairline-thickness) solid var(--hairline-color); } -#invitation #invite_header { - margin: 10px; - list-style: none; - display: flex; - align-items: center; - justify-content: center; - - /* enable selection (it is globally disabled in the body) */ - -webkit-user-select: auto; -} + #invitation #invite_header { + margin: 10px; + list-style: none; + display: flex; + align-items: center; + justify-content: center; + /* enable selection (it is globally disabled in the body) */ + -webkit-user-select: auto; + } #invitation .sender_image { width: 50px; @@ -233,16 +232,19 @@ body { margin-left: 5px; } -#invitation #text { - text-align: center; - font-size: 0.8em; + #invitation #text { + text-align: center; + font: 11pt sans-serif; - /* enable selection (it is globally disabled in the body) */ - -webkit-user-select: auto; + /* enable selection (it is globally disabled in the body) */ + -webkit-user-select: auto; + } + +#invite_contact_name { + font-weight: 500; } /** Messaging bar */ - #sendMessage { background-color: var(--bg-color); display: flex; diff --git a/web/chatview.js b/web/chatview.js index f684599e651a0bd36a0b73324b77354f0a2dc688..917f4616e26cdcec90244eb1af5ad0e6f391ebdb 100644 --- a/web/chatview.js +++ b/web/chatview.js @@ -162,7 +162,7 @@ function showInvitation(contactAlias, contactId) { inviteImage.classList.add(`invite_sender_image_${contactId}`); } hasInvitation = true - invitationText.innerHTML = "<b>" + contactAlias + " is not in your contacts</b><br/>" + invitationText.innerHTML = "<span id='invite_contact_name'>" + contactAlias + "</span> is not in your contacts<br/>" + "Note: you can automatically accept this invitation by sending a message." invitation.style.visibility = "visible" }