Skip to content

Commit be745be

Browse files
silverwindzeripathtechknowlogick
authored
Double the avatar size factor (#15941)
* Double the avatar size factor This results on finer Avatar rendering on Hi-DPI display. * fix test Co-authored-by: zeripath <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 44d76ff commit be745be

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

models/avatar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const DefaultAvatarSize = -1
4444
const DefaultAvatarPixelSize = 28
4545

4646
// AvatarRenderedSizeFactor is the factor by which the default size is increased for finer rendering
47-
const AvatarRenderedSizeFactor = 2
47+
const AvatarRenderedSizeFactor = 4
4848

4949
// HashEmail hashes email address to MD5 string.
5050
// https://en.gravatar.com/site/implement/hash/

modules/repository/commits_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ func TestPushCommits_AvatarLink(t *testing.T) {
112112
pushCommits.Len = len(pushCommits.Commits)
113113

114114
assert.Equal(t,
115-
"https://secure.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?d=identicon&s=56",
115+
"https://secure.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?d=identicon&s=112",
116116
pushCommits.AvatarLink("[email protected]"))
117117

118118
assert.Equal(t,
119119
"https://secure.gravatar.com/avatar/"+
120120
fmt.Sprintf("%x", md5.Sum([]byte("[email protected]")))+
121-
"?d=identicon&s=56",
121+
"?d=identicon&s=112",
122122
pushCommits.AvatarLink("[email protected]"))
123123
}
124124

0 commit comments

Comments
 (0)