diff options
author | Tobias Markmann <tm@ayena.de> | 2016-10-20 10:56:59 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-10-24 07:36:45 (GMT) |
commit | b26ad89bddfc171050c3148e3b122599f3b3464b (patch) | |
tree | 8b7058fa2021c10ea161ec9acb170b8dcce8c4d3 | |
parent | e7ea063f2d5e448d10111d14539c7b19b34243a6 (diff) | |
download | swift-b26ad89bddfc171050c3148e3b122599f3b3464b.zip swift-b26ad89bddfc171050c3148e3b122599f3b3464b.tar.bz2 |
Make avatar size relative to font size
A recent change to web view scaling to have equal font sizes
in and outside the web view cause the pixel sized avatars
to be half the usual size. With this fix the avatar is as
high as The the nickname plus the first line of the first
message.
Test-Information:
Tested on macOS 10.12 with Qt 5.7.0 and QtWebKit TP4.
Change-Id: I13e3c83fdb00e0dc9079c3ad5d6a380f6db5a499
-rw-r--r-- | Swift/resources/themes/Default/main.css | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/Swift/resources/themes/Default/main.css b/Swift/resources/themes/Default/main.css index d759ced..c5cc977 100644 --- a/Swift/resources/themes/Default/main.css +++ b/Swift/resources/themes/Default/main.css @@ -17,11 +17,8 @@ body { height: 100%; width: 100%; background-color: #fff; - /*border: solid 1px #595959; /* REMOVE THIS LINE. FOR DISPLAY PURPOSE ONLY. */ - /*margin-left: 20%; /* REMOVE THIS LINE. FOR DISPLAY PURPOSE ONLY. */ - /*margin-top: 75px; /* REMOVE THIS LINE. FOR DISPLAY PURPOSE ONLY. */ position: absolute; - display: table; + display: table; } /* Holds all user and message content */ @@ -35,7 +32,6 @@ body { top: 0; left: 0; overflow-wrap: break-word; /* Allow breaking of long words (e.g. URLs) to prevent overflow. */ - /*margin-top: -2px; /* REMOVE THIS LINE. FOR DISPLAY PURPOSE ONLY. */ } /* Individual message */ @@ -77,7 +73,7 @@ body { /* Left column content */ :not(.additional) > .user { - height: 32px; + height: 2.5em; } .user { @@ -92,7 +88,7 @@ body { } .time { - height: 32px; + height: 2.5em; width: 103px; float: left; text-align: right; @@ -133,20 +129,20 @@ body { } .myavatar { - height: 32px; - width: 32px; + height: 2.5em; + width: 2.5em; display: inline-block; - margin:0 auto; + margin: 0 auto; background-color: #92c47e; border-top-left-radius: 50%; border-bottom-left-radius: 50%; } .otheravatar { - height: 32px; - width: 32px; + height: 2.5em; + width: 2.5em; display: inline-block; - margin:0 auto; + margin: 0 auto; background-color: #6eb6ce; border-top-left-radius: 50%; border-bottom-left-radius: 50%; @@ -154,52 +150,52 @@ body { .myavatar img { border-radius: 50%; - height: 32px; + height: 2.5em; position: relative; left: -1px; } .otheravatar img { border-radius: 50%; - height: 32px; + height: 2.5em; position: relative; left: -1px; } .myright { - float:right; - width:40px; - height: 32px; + float: right; + width: 1.65em; + height: 2.5em; background: #92c47e; } .otherright { - float:right; - width:40px; - height: 32px; + float: right; + width: 1.65em; + height: 2.5em; background: #6eb6ce; } :not(.additional) > div > .systemavatar { - height: 32px; + height: 2.5em; } .systemavatar { - width: 32px; + width: 2.5em; display: inline-block; - margin:0 auto; + margin: 0 auto; background-color: #595959; border-top-left-radius: 50%; border-bottom-left-radius: 50%; } :not(.additional) > div > .systemright { - height: 32px; + height: 2.5em; } .systemright { - float:right; - width: 40px; + float: right; + width: 1.65em; background: #595959; } @@ -209,7 +205,7 @@ body { } .message:not(.additional) .text { - min-height: 32px; + min-height: 2.5em; } .text { |