mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
RTL flipping for statusbars.
This commit is contained in:
parent
65ab094e54
commit
31ef3456c8
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -1,3 +1,15 @@
|
||||
2002-12-03 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
RTL flipping for statusbars. (#96832)
|
||||
|
||||
* gtk/gtkstatusbar.c (get_grip_edge): New function returning the
|
||||
appropriate grip edge for a statusbar.
|
||||
(get_grip_rect): Do the right thing in RTL mode.
|
||||
(gtk_statusbar_button_press): Initiate a resize drag on the
|
||||
appropriate edge.
|
||||
(gtk_statusbar_expose_event): Paint the resize grip for the
|
||||
appropriate edge.
|
||||
|
||||
2002-12-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c: Fix doc comment.
|
||||
|
@ -421,6 +421,17 @@ gtk_statusbar_destroy (GtkObject *object)
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
}
|
||||
|
||||
static GdkWindowEdge
|
||||
get_grip_edge (GtkStatusbar *statusbar)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (statusbar);
|
||||
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||
return GDK_WINDOW_EDGE_SOUTH_EAST;
|
||||
else
|
||||
return GDK_WINDOW_EDGE_SOUTH_WEST;
|
||||
}
|
||||
|
||||
static void
|
||||
get_grip_rect (GtkStatusbar *statusbar,
|
||||
GdkRectangle *rect)
|
||||
@ -440,10 +451,14 @@ get_grip_rect (GtkStatusbar *statusbar,
|
||||
if (h > (widget->allocation.height - widget->style->ythickness))
|
||||
h = widget->allocation.height - widget->style->ythickness;
|
||||
|
||||
rect->x = widget->allocation.x + widget->allocation.width - w;
|
||||
rect->y = widget->allocation.y + widget->allocation.height - h;
|
||||
rect->width = w;
|
||||
rect->height = h;
|
||||
rect->y = widget->allocation.y + widget->allocation.height - h;
|
||||
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
|
||||
rect->x = widget->allocation.x + widget->allocation.width - w;
|
||||
else
|
||||
rect->x = widget->allocation.x + widget->style->xthickness;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -543,6 +558,7 @@ gtk_statusbar_button_press (GtkWidget *widget,
|
||||
{
|
||||
GtkStatusbar *statusbar;
|
||||
GtkWidget *ancestor;
|
||||
GdkWindowEdge edge;
|
||||
|
||||
statusbar = GTK_STATUSBAR (widget);
|
||||
|
||||
@ -555,9 +571,11 @@ gtk_statusbar_button_press (GtkWidget *widget,
|
||||
if (!GTK_IS_WINDOW (ancestor))
|
||||
return FALSE;
|
||||
|
||||
edge = get_grip_edge (statusbar);
|
||||
|
||||
if (event->button == 1)
|
||||
gtk_window_begin_resize_drag (GTK_WINDOW (ancestor),
|
||||
GDK_WINDOW_EDGE_SOUTH_EAST,
|
||||
edge,
|
||||
event->button,
|
||||
event->x_root, event->y_root,
|
||||
event->time);
|
||||
@ -585,6 +603,10 @@ gtk_statusbar_expose_event (GtkWidget *widget,
|
||||
|
||||
if (statusbar->has_resize_grip)
|
||||
{
|
||||
GdkWindowEdge edge;
|
||||
|
||||
edge = get_grip_edge (statusbar);
|
||||
|
||||
get_grip_rect (statusbar, &rect);
|
||||
|
||||
gtk_paint_resize_grip (widget->style,
|
||||
@ -593,7 +615,7 @@ gtk_statusbar_expose_event (GtkWidget *widget,
|
||||
NULL,
|
||||
widget,
|
||||
"statusbar",
|
||||
GDK_WINDOW_EDGE_SOUTH_EAST,
|
||||
edge,
|
||||
rect.x, rect.y,
|
||||
/* don't draw grip over the frame, though you
|
||||
* can click on the frame.
|
||||
|
Loading…
Reference in New Issue
Block a user