summaryrefslogtreecommitdiff
path: root/src/ui/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/theme.c')
-rw-r--r--src/ui/theme.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 01402e47..132e70b4 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -641,6 +641,16 @@ get_padding_and_border (GtkStyleContext *style,
}
static void
+scale_border (GtkBorder *border,
+ double factor)
+{
+ border->left *= factor;
+ border->right *= factor;
+ border->top *= factor;
+ border->bottom *= factor;
+}
+
+static void
meta_frame_layout_sync_with_style (MetaFrameLayout *layout,
MetaStyleInfo *style_info,
MetaFrameFlags flags)
@@ -659,6 +669,7 @@ meta_frame_layout_sync_with_style (MetaFrameLayout *layout,
style = style_info->styles[META_STYLE_ELEMENT_FRAME];
get_padding_and_border (style, &border);
+ scale_border (&border, layout->title_scale);
layout->left_width = border.left;
layout->right_width = border.right;
@@ -687,6 +698,7 @@ meta_frame_layout_sync_with_style (MetaFrameLayout *layout,
layout->bottom_right_corner_rounded_radius = MAX (border_radius, max_radius);
get_padding_and_border (style, &border);
+ scale_border (&border, layout->title_scale);
layout->left_titlebar_edge = border.left;
layout->right_titlebar_edge = border.right;
layout->title_vertical_pad = border.top;
@@ -701,11 +713,13 @@ meta_frame_layout_sync_with_style (MetaFrameLayout *layout,
style = style_info->styles[META_STYLE_ELEMENT_BUTTON];
get_padding_and_border (style, &border);
+ scale_border (&border, layout->title_scale);
layout->button_width += border.left + border.right;
layout->button_height += border.top + border.bottom;
style = style_info->styles[META_STYLE_ELEMENT_IMAGE];
get_padding_and_border (style, &border);
+ scale_border (&border, layout->title_scale);
layout->button_width += border.left + border.right;
layout->button_height += border.top + border.bottom;
}