summaryrefslogtreecommitdiff
path: root/src/ui/preview-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/preview-widget.c')
-rw-r--r--src/ui/preview-widget.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index 6c819707..2928d3b1 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -98,10 +98,7 @@ meta_preview_init (MetaPreview *preview)
META_FRAME_ALLOWS_SHADE |
META_FRAME_ALLOWS_MOVE;
- preview->borders.visible.left = -1;
- preview->borders.visible.right = -1;
- preview->borders.visible.top = -1;
- preview->borders.visible.bottom = -1;
+ preview->borders_cached = FALSE;
}
GtkWidget*
@@ -172,23 +169,17 @@ ensure_info (MetaPreview *preview)
pango_font_description_free (font_desc);
}
- if (preview->borders.visible.top < 0)
+ if (!preview->borders_cached)
{
if (preview->theme)
- {
meta_theme_get_frame_borders (preview->theme,
preview->type,
preview->text_height,
preview->flags,
&preview->borders);
- }
else
- {
- preview->borders.visible.top = 0;
- preview->borders.visible.bottom = 0;
- preview->borders.visible.left = 0;
- preview->borders.visible.right = 0;
- }
+ meta_frame_borders_clear (&preview->borders);
+ preview->borders_cached = TRUE;
}
}
@@ -362,10 +353,7 @@ clear_cache (MetaPreview *preview)
preview->layout = NULL;
}
- preview->borders.visible.left = -1;
- preview->borders.visible.right = -1;
- preview->borders.visible.top = -1;
- preview->borders.visible.bottom = -1;
+ preview->borders_cached = FALSE;
}
void