* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
window when appropriate.
+ (gtk_statusbar_init): Instead of cutting the text of, make
+ ellipsize the label.
+ (gtk_statusbar_size_allocate): Don't let the label extend
+ under the resize grip.
* gtk/gtkcombobox.c (find_menu_by_path)
(gtk_combo_box_menu_fill_level, gtk_combo_box_menu_row_inserted):
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
window when appropriate.
+ (gtk_statusbar_init): Instead of cutting the text of, make
+ ellipsize the label.
+ (gtk_statusbar_size_allocate): Don't let the label extend
+ under the resize grip.
* gtk/gtkcombobox.c (find_menu_by_path)
(gtk_combo_box_menu_fill_level, gtk_combo_box_menu_row_inserted):
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
window when appropriate.
+ (gtk_statusbar_init): Instead of cutting the text of, make
+ ellipsize the label.
+ (gtk_statusbar_size_allocate): Don't let the label extend
+ under the resize grip.
* gtk/gtkcombobox.c (find_menu_by_path)
(gtk_combo_box_menu_fill_level, gtk_combo_box_menu_row_inserted):
* gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip
window when appropriate.
+ (gtk_statusbar_init): Instead of cutting the text of, make
+ ellipsize the label.
+ (gtk_statusbar_size_allocate): Don't let the label extend
+ under the resize grip.
* gtk/gtkcombobox.c (find_menu_by_path)
(gtk_combo_box_menu_fill_level, gtk_combo_box_menu_row_inserted):
statusbar->label = gtk_label_new ("");
gtk_label_set_single_line_mode (GTK_LABEL (statusbar->label), TRUE);
gtk_misc_set_alignment (GTK_MISC (statusbar->label), 0.0, 0.5);
- /* don't expand the size request for the label; if we
- * do that then toplevels weirdly resize
- */
g_signal_connect (statusbar->label, "notify::selectable",
G_CALLBACK (label_selectable_changed), statusbar);
- gtk_widget_set_size_request (statusbar->label, 1, -1);
+ gtk_label_set_ellipsize (GTK_LABEL (statusbar->label), PANGO_ELLIPSIZE_END);
gtk_container_add (GTK_CONTAINER (statusbar->frame), statusbar->label);
gtk_widget_show (statusbar->label);
if (setting != statusbar->has_resize_grip)
{
statusbar->has_resize_grip = setting;
+ gtk_widget_queue_resize (statusbar->label);
gtk_widget_queue_draw (GTK_WIDGET (statusbar));
if (GTK_WIDGET_REALIZED (statusbar))
else if (!statusbar->has_resize_grip && statusbar->grip_window != NULL)
gtk_statusbar_destroy_window (statusbar);
}
-
+
g_object_notify (G_OBJECT (statusbar), "has_resize_grip");
}
}
if (statusbar->has_resize_grip && statusbar->grip_window)
{
GdkRectangle rect;
+ GtkAllocation allocation;
get_grip_rect (statusbar, &rect);
gdk_window_move_resize (statusbar->grip_window,
rect.x, rect.y,
rect.width, rect.height);
+
+ allocation = statusbar->label->allocation;
+ allocation.width -= rect.width;
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+ allocation.x += rect.width;
+
+ gtk_widget_size_allocate (statusbar->label, &allocation);
}
}