Commit 45d83bde authored by Andreas Traczyk's avatar Andreas Traczyk

messageview: homogenize fonts for invites

Change-Id: I01e72deee52ad061ba011580c3e4daff576a1f81
parent f8052f6c
......@@ -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;
......
......@@ -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;
......
......@@ -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"
}
......
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