[glade] * gladeui/glade-design-layout.c: o removed double click toplevel maximize feature o replaced GDK
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] * gladeui/glade-design-layout.c: o removed double click toplevel maximize feature o replaced GDK
- Date: Thu, 3 Mar 2011 04:11:16 +0000 (UTC)
commit 2161845d6a62bfb19182accef23f4850054ce577
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Wed Mar 2 19:44:19 2011 -0300
* gladeui/glade-design-layout.c:
o removed double click toplevel maximize feature
o replaced GDK_FLEUR cursor with GDK_BOTTOM_RIGHT_CORNER for resize action
* gladeui/glade-design-view.c: make layout_box GTK_ALIGN_START to fix toplevel alignment
gladeui/glade-design-layout.c | 60 +----------------------------------------
gladeui/glade-design-view.c | 1 +
2 files changed, 2 insertions(+), 59 deletions(-)
---
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index b268379..e322573 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -283,64 +283,6 @@ glade_design_layout_button_press_event (GtkWidget *widget, GdkEventButton *ev)
}
}
}
- else if (ev->type == GDK_2BUTTON_PRESS &&
- priv->activity == ACTIVITY_RESIZE_WIDTH_AND_HEIGHT)
- {
- GtkAdjustment *vadj, *hadj;
- GtkWidget *win, *parent, *sb;
- GtkScrolledWindow *swin;
- gint height, width, spacing, sb_width = 0, sb_height = 0;
- GtkAllocation alloc;
- GtkRequisition req;
-
- gtk_widget_get_allocation (widget, &alloc);
- parent = gtk_widget_get_parent (widget);
- win = gtk_widget_get_ancestor (widget, GTK_TYPE_SCROLLED_WINDOW);
- gtk_widget_style_get (win, "scrollbar-spacing", &spacing, NULL);
- swin = GTK_SCROLLED_WINDOW (win);
- vadj = gtk_scrolled_window_get_vadjustment (swin);
- hadj = gtk_scrolled_window_get_hadjustment (swin);
-
- /* Check if verticall scrollbar will show up */
- sb = gtk_scrolled_window_get_vscrollbar (swin);
- gtk_widget_get_preferred_size (parent, &req, NULL);
- if (!gtk_widget_get_visible (sb) && req.height > gtk_widget_get_allocated_height (widget))
- {
- gtk_widget_get_preferred_width (sb, &sb_width, NULL);
- sb_width += spacing;
- }
-
- alloc.width = gtk_adjustment_get_page_size (hadj) - priv->child_offset * 2 - sb_width;
-
- /* Check if horizontal scrollbar will show up */
- sb = gtk_scrolled_window_get_hscrollbar (swin);
- gtk_widget_get_preferred_width (parent, &width, NULL);
- if (!gtk_widget_get_visible (sb) &&
- req.width > MAX (gtk_widget_get_allocated_width (widget), alloc.width))
- {
- gtk_widget_get_preferred_height (sb, &sb_height, NULL);
- sb_height += spacing;
- }
-
- /* get widget name height */
- if (priv->widget_name)
- pango_layout_get_pixel_size (priv->widget_name, NULL, &height);
- else
- height = PADDING;
-
- alloc.height = gtk_adjustment_get_page_size (vadj) - (PADDING + height + 2.5 * OUTLINE_WIDTH) - sb_height;
-
- /* Maximize */
- glade_design_layout_update_child (GLADE_DESIGN_LAYOUT (widget),
- child, &alloc);
-
- /* give a chance for widget to realocate */
- while (gtk_events_pending ()) gtk_main_iteration_do (FALSE);
-
- /* Position layout */
- gtk_adjustment_set_value (hadj, 0);
- gtk_adjustment_set_value (vadj, alloc.y);
- }
return FALSE;
}
@@ -929,7 +871,7 @@ glade_design_layout_realize (GtkWidget * widget)
display = gtk_widget_get_display (widget);
priv->cursors[ACTIVITY_RESIZE_HEIGHT] = gdk_cursor_new_for_display (display, GDK_BOTTOM_SIDE);
priv->cursors[ACTIVITY_RESIZE_WIDTH] = gdk_cursor_new_for_display (display, GDK_RIGHT_SIDE);
- priv->cursors[ACTIVITY_RESIZE_WIDTH_AND_HEIGHT] = gdk_cursor_new_for_display (display, GDK_FLEUR);
+ priv->cursors[ACTIVITY_RESIZE_WIDTH_AND_HEIGHT] = gdk_cursor_new_for_display (display, GDK_BOTTOM_RIGHT_CORNER);
priv->widget_name = pango_layout_new (gtk_widget_get_pango_context (widget));
}
diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c
index 491bee4..af68862 100644
--- a/gladeui/glade-design-view.c
+++ b/gladeui/glade-design-view.c
@@ -316,6 +316,7 @@ glade_design_view_init (GladeDesignView *view)
view->priv->project = NULL;
view->priv->layout_box = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_valign (view->priv->layout_box, GTK_ALIGN_START);
gtk_container_set_border_width (GTK_CONTAINER (view->priv->layout_box), 0);
gtk_box_pack_end (GTK_BOX (view->priv->layout_box), gtk_fixed_new (), FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]