[gtkmm] Gtk::AspectFrame::set(): Remove default value of obey_child
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::AspectFrame::set(): Remove default value of obey_child
- Date: Tue, 11 Jul 2017 17:02:23 +0000 (UTC)
commit 4787a9199f69e9753d0b9f868524afe9dfd88a73
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Jul 11 18:57:52 2017 +0200
Gtk::AspectFrame::set(): Remove default value of obey_child
The obey_child parameter has different default values in set() and in the
constructors. That's inconsistent and a bit confusing.
gtk/src/aspectframe.hg | 47 +++++++++++++++++++++++------------------------
1 files changed, 23 insertions(+), 24 deletions(-)
---
diff --git a/gtk/src/aspectframe.hg b/gtk/src/aspectframe.hg
index b4a9529..53425c3 100644
--- a/gtk/src/aspectframe.hg
+++ b/gtk/src/aspectframe.hg
@@ -25,7 +25,7 @@ namespace Gtk
/** A frame that constrains its child to a particular aspect ratio.
*
- * The Gtk::AspectFrame is useful when you want pack a widget so that it can
+ * The %Gtk::AspectFrame is useful when you want pack a widget so that it can
* resize but always retains the same aspect ratio. For instance, one might
* be drawing a small preview of a larger image. Because it derives from
* Gtk::Frame, it can draw a label and a frame around the child. The frame
@@ -40,56 +40,55 @@ class AspectFrame : public Frame
public:
- /** Constructor to create a new AspectFrame object.
+ /** Constructor to create a new %AspectFrame object.
* @param label Label text.
* @param xalign Horizontal alignment of the child within the allocation of this
- * AspectFrame. For possible values, see Gtk::Align.
+ * %AspectFrame. For possible values, see Gtk::Align.
* @param yalign Vertical alignment of the child within the allocation of this
- * AspectFrame. For possible values, see Gtk::Align.
+ * %AspectFrame. For possible values, see Gtk::Align.
* @param ratio The desired aspect ratio.
- * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
- * is taken from the requisition of the child.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
*/
_WRAP_CTOR(AspectFrame(const Glib::ustring& label = Glib::ustring(),
Align xalign = Gtk::Align::CENTER, Align yalign = Gtk::Align::CENTER,
float ratio = 1.0, bool obey_child = false), gtk_aspect_frame_new)
- /** Constructor to create a new AspectFrame object.
+ /** Constructor to create a new %AspectFrame object.
* @param label Label text.
* @param xalign Horizontal alignment of the child within the allocation of this
- * AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
+ * %AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
* @param yalign Vertical alignment of the child within the allocation of this
- * AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
+ * %AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
* @param ratio The desired aspect ratio.
- * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
- * is taken from the requisition of the child.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
*/
_WRAP_CTOR(AspectFrame(const Glib::ustring& label,
float xalign, float yalign,
float ratio = 1.0, bool obey_child = false), gtk_aspect_frame_new)
- //TODO: Is "obey_child = true" a good default?
- /** Set the properties of this AspectFrame.
+ /** Set the properties of this %AspectFrame.
* @param xalign Horizontal alignment of the child within the allocation of this
- * AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
+ * %AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
* @param yalign Vertical alignment of the child within the allocation of this
- * AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
+ * %AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
* @param ratio The desired aspect ratio.
- * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
- * is taken from the requisition of the child.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
*/
- _WRAP_METHOD(void set(float xalign, float yalign, float ratio, bool obey_child = true),
gtk_aspect_frame_set)
+ _WRAP_METHOD(void set(float xalign, float yalign, float ratio, bool obey_child), gtk_aspect_frame_set)
- /** Set the properties of this AspectFrame.
+ /** Set the properties of this %AspectFrame.
* @param xalign Horizontal alignment of the child within the allocation of this
- * AspectFrame. For possible values, see Gtk::Align.
+ * %AspectFrame. For possible values, see Gtk::Align.
* @param yalign Vertical alignment of the child within the allocation of this
- * AspectFrame. For possible values, see Gtk::Align.
+ * %AspectFrame. For possible values, see Gtk::Align.
* @param ratio The desired aspect ratio.
- * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
- * is taken from the requisition of the child.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
*/
- _WRAP_METHOD(void set(Align xalign, Align yalign, float ratio, bool obey_child = true),
gtk_aspect_frame_set)
+ _WRAP_METHOD(void set(Align xalign, Align yalign, float ratio, bool obey_child), gtk_aspect_frame_set)
_WRAP_PROPERTY("xalign", float)
_WRAP_PROPERTY("yalign", float)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]