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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 100219: Allow the user to resize the chromium window as small as they like. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 | « chrome/browser/gtk/browser_window_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
===================================================================
--- chrome/browser/gtk/browser_window_gtk.cc (revision 14956)
+++ chrome/browser/gtk/browser_window_gtk.cc (working copy)
@@ -206,7 +206,7 @@
full_screen_(false),
method_factory_(this) {
window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
- gtk_window_set_default_size(window_, 640, 480);
+ SetGeometryHints();
g_object_set_data(G_OBJECT(window_), "browser_window_gtk", this);
g_signal_connect(window_, "delete-event",
G_CALLBACK(MainWindowDeleteEvent), this);
@@ -659,6 +659,16 @@
gtk_box_reorder_child(GTK_BOX(content_vbox_), findbar->widget(), 2);
}
+void BrowserWindowGtk::SetGeometryHints() {
+ gtk_window_set_default_size(window_, 640, 480);
+
+ // Allow the user to resize us arbitrarily small.
+ GdkGeometry geometry;
+ geometry.min_width = 1;
+ geometry.min_height = 1;
+ gtk_window_set_geometry_hints(window_, NULL, &geometry, GDK_HINT_MIN_SIZE);
+}
+
void BrowserWindowGtk::ConnectAccelerators() {
GtkAccelGroup* accel_group = gtk_accel_group_new();
gtk_window_add_accel_group(window_, accel_group);
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698