summaryrefslogtreecommitdiffstats
path: root/app/gtk_util.h
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 21:32:57 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-07 21:32:57 +0000
commit3317e2755360c9c36258d45d48c502ffe79e45ba (patch)
tree53cfb96c842be890f457d77d221586ab546c9489 /app/gtk_util.h
parent965e4c45ae4111d7a36a3606bb984db2fc5ff39e (diff)
downloadchromium_src-3317e2755360c9c36258d45d48c502ffe79e45ba.zip
chromium_src-3317e2755360c9c36258d45d48c502ffe79e45ba.tar.gz
chromium_src-3317e2755360c9c36258d45d48c502ffe79e45ba.tar.bz2
[GTK] change workaround for weird RTL label alignment
When a GtkLabel has line wrapping and an integer size request, the text block is left aligned even in RTL locales. It will wrap at the left (which is correct) and be right justified (also correct) but is flush with the left of the widget allocation instead of the right of the widget allocation. seems not to occur when the size is controled via gtk_label_set_width_chars() instead of gtk_widget_set_size_request(). (also goes away when line wrapping is turned off) TODO: file a reduction upstream. BUG=52857 TEST=launch chrome in Hebrew and look at the under the hood tab of options. Checkbox labels should look correct Review URL: http://codereview.chromium.org/3355007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gtk_util.h')
-rw-r--r--app/gtk_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/gtk_util.h b/app/gtk_util.h
index 6225d3e..cbb91e9 100644
--- a/app/gtk_util.h
+++ b/app/gtk_util.h
@@ -27,6 +27,10 @@ void GetWidgetSizeFromCharacters(
GtkWidget* widget, double width_chars, double height_lines,
int* width, int* height);
+// Returns the approximate number of characters that can horizontally
+// fit in |pixel_width| pixels.
+int GetCharacterWidthForPixels(GtkWidget* widget, int pixel_width);
+
// A helper function for gtk_message_dialog_new() to work around a KDE 3
// window manager bugs. You should always call it after creating a dialog
// with gtk_message_dialog_new.