From 33d7196dc8274e8dd66b845c0444674d3f11f6fc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 10 Mar 2016 23:14:57 -0500 Subject: [PATCH] Add a layout debug option This will be used to show box model borders. --- docs/reference/gtk/running.sgml | 5 ++++- gtk/gtkdebug.h | 3 ++- gtk/gtkmain.c | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/reference/gtk/running.sgml b/docs/reference/gtk/running.sgml index 45bd74b7e1..9ed8a0897e 100644 --- a/docs/reference/gtk/running.sgml +++ b/docs/reference/gtk/running.sgml @@ -218,7 +218,10 @@ additional environment variables. resize Highlight resizing widgets - + + layout + Show layout borders + The special value all can be used to turn on all debug options. The special value help can be used diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h index e78dd6837f..741e1f85ef 100644 --- a/gtk/gtkdebug.h +++ b/gtk/gtkdebug.h @@ -55,7 +55,8 @@ typedef enum { GTK_DEBUG_INTERACTIVE = 1 << 17, GTK_DEBUG_TOUCHSCREEN = 1 << 18, GTK_DEBUG_ACTIONS = 1 << 19, - GTK_DEBUG_RESIZE = 1 << 20 + GTK_DEBUG_RESIZE = 1 << 20, + GTK_DEBUG_LAYOUT = 1 << 21 } GtkDebugFlag; #ifdef G_ENABLE_DEBUG diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 3afc189f76..8547519e82 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -181,7 +181,8 @@ static const GDebugKey gtk_debug_keys[] = { {"interactive", GTK_DEBUG_INTERACTIVE}, {"touchscreen", GTK_DEBUG_TOUCHSCREEN}, {"actions", GTK_DEBUG_ACTIONS}, - {"resize", GTK_DEBUG_RESIZE} + {"resize", GTK_DEBUG_RESIZE}, + {"layout", GTK_DEBUG_LAYOUT} }; #endif /* G_ENABLE_DEBUG */