Parameterize avatar_margin and assign it a default of 8

This commit is contained in:
Antonio Scandurra 2022-05-03 18:04:53 +02:00
parent c268099554
commit 3ee4d90c19
11 changed files with 11 additions and 1 deletions

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#26232a",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#e2dfe7",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#2b2b2b",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#eaeaea",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#073642",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#eee8d5",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#293256",
"padding": {

View File

@ -346,6 +346,7 @@
},
"titlebar": {
"avatar_width": 18,
"avatar_margin": 8,
"height": 33,
"background": "#dfe2f1",
"padding": {

View File

@ -53,6 +53,7 @@ pub struct Titlebar {
pub height: f32,
pub title: TextStyle,
pub avatar_width: f32,
pub avatar_margin: f32,
pub avatar_ribbon: AvatarRibbon,
pub offline_icon: OfflineIcon,
pub share_icon: Interactive<ShareIcon>,

View File

@ -1629,7 +1629,7 @@ impl Workspace {
.constrained()
.with_width(theme.workspace.titlebar.avatar_width)
.contained()
.with_margin_left(2.)
.with_margin_left(theme.workspace.titlebar.avatar_margin)
.boxed();
if let Some(peer_id) = peer_id {

View File

@ -61,6 +61,7 @@ export default function workspace(theme: Theme) {
statusBar: statusBar(theme),
titlebar: {
avatarWidth: 18,
avatarMargin: 8,
height: 33,
background: backgroundColor(theme, 100),
padding: {