Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: views/widget/gtk_views_fixed.h

Issue 2768006: Test + Fix for GTK window resizing when using toolkit views. (Closed)
Patch Set: Return a gfx::Size instead. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | views/widget/gtk_views_fixed.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/gtk_views_fixed.h
diff --git a/views/widget/gtk_views_fixed.h b/views/widget/gtk_views_fixed.h
index a03c67b4fe14909397922dd4f648c20c9248a60c..e9f3fe7cecad8c94e12cba06d60c6f9d5b89c459 100644
--- a/views/widget/gtk_views_fixed.h
+++ b/views/widget/gtk_views_fixed.h
@@ -9,10 +9,11 @@
#include <gdk/gdk.h>
#include <gtk/gtkfixed.h>
-// GtkViewsFixed is a subclass of GtkFixed that can give child widgets their
-// current size rather than their requested size. This behavior is controlled
-// by gtk_views_fixed_set_use_allocated_size; the default is to use the
-// Widget's requested size.
+// GtkViewsFixed is a subclass of GtkFixed that can give child widgets
+// a set size rather than their requisitioned size (which is actually
+// a minimum size, and that can cause issues). This behavior is
+// controlled by gtk_views_fixed_set_widget_size; the default is to
+// use the Widget's requisitioned size.
G_BEGIN_DECLS
@@ -43,7 +44,12 @@ GtkWidget* gtk_views_fixed_new();
GType gtk_views_fixed_get_type();
-void gtk_views_fixed_set_use_allocated_size(GtkWidget* widget, bool value);
+// If width and height are 0, go back to using the requisitioned size.
+// Queues up a re-size on the widget.
+void gtk_views_fixed_set_widget_size(GtkWidget* widget, int width, int height);
+
+bool gtk_views_fixed_get_widget_size(GtkWidget* widget,
+ int* width, int* height);
G_END_DECLS
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane_unittest.cc ('k') | views/widget/gtk_views_fixed.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698