summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2011-10-28 12:17:46 -0400
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-20 19:53:22 +0200
commit6836a62148e47d1a7009561704b1f7332a8470c7 (patch)
tree22960039acb2b3fa6670076348cc55d1625936c5
parent9da3004e15f172cad26c5072212aa813feaf85a8 (diff)
downloadmetacity-6836a62148e47d1a7009561704b1f7332a8470c7.tar.gz
theme-viewer: Fix invisible borders
https://bugzilla.gnome.org/show_bug.cgi?id=662895
-rw-r--r--src/ui/preview-widget.c16
-rw-r--r--src/ui/theme-viewer.c4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index 1d7aeb63..4a75a454 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -218,8 +218,8 @@ meta_preview_draw (GtkWidget *widget,
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
gtk_widget_get_allocation (widget, &allocation);
- client_width = allocation.width - preview->borders.visible.left - preview->borders.visible.right - border_width * 2;
- client_height = allocation.height - preview->borders.visible.top - preview->borders.visible.bottom - border_width * 2;
+ client_width = allocation.width - preview->borders.total.left - preview->borders.total.right - border_width * 2;
+ client_height = allocation.height - preview->borders.total.top - preview->borders.total.bottom - border_width * 2;
if (client_width < 0)
client_width = 1;
@@ -277,7 +277,7 @@ meta_preview_get_preferred_width (GtkWidget *widget,
ensure_info (preview);
- *minimum = *natural = preview->borders.visible.left + preview->borders.visible.right;
+ *minimum = *natural = preview->borders.total.left + preview->borders.total.right;
child = gtk_bin_get_child (GTK_BIN (preview));
if (child && gtk_widget_get_visible (child))
@@ -313,7 +313,7 @@ meta_preview_get_preferred_height (GtkWidget *widget,
ensure_info (preview);
- *minimum = *natural = preview->borders.visible.top + preview->borders.visible.bottom;
+ *minimum = *natural = preview->borders.total.top + preview->borders.total.bottom;
child = gtk_bin_get_child (GTK_BIN (preview));
if (child && gtk_widget_get_visible (child))
@@ -358,11 +358,11 @@ meta_preview_size_allocate (GtkWidget *widget,
gtk_widget_get_visible (child))
{
gtk_widget_get_allocation (widget, &widget_allocation);
- child_allocation.x = widget_allocation.x + border_width + preview->borders.visible.left;
- child_allocation.y = widget_allocation.y + border_width + preview->borders.visible.top;
+ child_allocation.x = widget_allocation.x + border_width + preview->borders.total.left;
+ child_allocation.y = widget_allocation.y + border_width + preview->borders.total.top;
- child_allocation.width = MAX (1, widget_allocation.width - border_width * 2 - preview->borders.visible.left - preview->borders.visible.right);
- child_allocation.height = MAX (1, widget_allocation.height - border_width * 2 - preview->borders.visible.top - preview->borders.visible.bottom);
+ child_allocation.width = MAX (1, widget_allocation.width - border_width * 2 - preview->borders.total.left - preview->borders.total.right);
+ child_allocation.height = MAX (1, widget_allocation.height - border_width * 2 - preview->borders.total.top - preview->borders.total.bottom);
gtk_widget_size_allocate (gtk_bin_get_child (GTK_BIN (widget)), &child_allocation);
}
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 22c618a6..7e2946b7 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -1080,8 +1080,8 @@ run_theme_benchmark (void)
*/
pixmap = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
CAIRO_CONTENT_COLOR,
- client_width + borders.visible.left + borders.visible.right,
- client_height + borders.visible.top + borders.visible.bottom);
+ client_width + borders.total.left + borders.total.right,
+ client_height + borders.total.top + borders.total.bottom);
cr = cairo_create (pixmap);
meta_theme_draw_frame (global_theme,