From 4ba86706befac23f73ea76676572275f448146e5 Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Thu, 3 Aug 2017 12:42:20 +0100 Subject: [PATCH] GtkFixed: Update documentation intro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Add GtkLayout as a @See_also since it includes fixed-pos functionality • Drop mention of the long-gone Linux framebuffer port • Explain how to work around the problems with RTL text --- gtk/gtkfixed.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c index 79d00cdfa6..3ed54b8fa2 100644 --- a/gtk/gtkfixed.c +++ b/gtk/gtkfixed.c @@ -27,6 +27,7 @@ * @Short_description: A container which allows you to position * widgets at fixed coordinates * @Title: GtkFixed + * @See_also: #GtkLayout * * The #GtkFixed widget is a container which can place child widgets * at fixed positions and with fixed sizes, given in pixels. #GtkFixed @@ -43,18 +44,19 @@ * - Fonts other than the one you used to write the app will of course * change the size of widgets containing text; keep in mind that * users may use a larger font because of difficulty reading the - * default, or they may be using Windows or the framebuffer port of - * GTK+, where different fonts are available. + * default, or they may be using a different OS that provides different fonts. * * - Translation of text into other languages changes its size. Also, * display of non-English text will use a different font in many * cases. * - * In addition, the fixed widget can’t properly be mirrored in - * right-to-left languages such as Hebrew and Arabic. i.e. normally - * GTK+ will flip the interface to put labels to the right of the - * thing they label, but it can’t do that with #GtkFixed. So your - * application will not be usable in right-to-left languages. + * In addition, #GtkFixed does not pay attention to text direction and thus may + * produce unwanted results if your app is run under right-to-left languages + * such as Hebrew or Arabic. That is: normally GTK+ will order containers + * appropriately for the text direction, e.g. to put labels to the right of the + * thing they label when using an RTL language, but it can’t do that with + * #GtkFixed. So if you need to reorder widgets depending on the text direction, + * you would need to manually detect it and adjust child positions accordingly. * * Finally, fixed positioning makes it kind of annoying to add/remove * GUI elements, since you have to reposition all the other @@ -64,6 +66,9 @@ * If you know none of these things are an issue for your application, * and prefer the simplicity of #GtkFixed, by all means use the * widget. But you should be aware of the tradeoffs. + * + * See also #GtkLayout, which shares the ability to perform fixed positioning + * of child widgets and additionally adds custom drawing and scrollability. */ #include "config.h"