[gtk+] spin button: Document sizing peculiarities



commit 79fb921ffc7d19ba85ca3df966d3317c93b382e6
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 27 23:30:25 2016 -0500

    spin button: Document sizing peculiarities
    
    Document that it is best to explicitly set width-chars and
    max-width-chars to avoid surprises.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727294

 gtk/gtkspinbutton.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 27f5184..7961dc9 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -81,7 +81,11 @@
  *
  * The main properties of a GtkSpinButton are through an adjustment.
  * See the #GtkAdjustment section for more details about an adjustment's
- * properties.
+ * properties. Note that GtkSpinButton will by default make its entry
+ * large enough to accomodate the lower and upper bounds of the adjustment,
+ * which can lead to surprising results. Best practice is to set both
+ * the #GtkEntry::width-chars and #GtkEntry::max-width-chars poperties
+ * to the desired number of characters to display in the entry.
  *
  * # CSS nodes
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]