Fixed drawing functions to handle switching themes on the fly gracefully
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com> * Fixed drawing functions to handle switching themes on the fly gracefully and look decent.
This commit is contained in:
committed by
Carsten Haitzler
parent
513de4171a
commit
8fc624c81b
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Wed Jul 29 16:03:20 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Fixed drawing functions to handle switching themes on the fly
|
||||
gracefully and look decent.
|
||||
|
||||
Tue Jul 28 22:52:10 EDT 1998 The Rasterman <raster@redhat.com>
|
||||
* Added all the theme drawing code to all widgets, fixed up minor
|
||||
nigglies in some widgets when it comes to themes, seem to be
|
||||
|
||||
@@ -354,6 +354,8 @@ static void extend_selection (GtkCList *clist,
|
||||
|
||||
static void add_style_data (GtkCList * clist);
|
||||
|
||||
static void gtk_clist_style_set (GtkWidget *widget, GtkStyle *previous_style);
|
||||
|
||||
static GtkContainerClass *parent_class = NULL;
|
||||
static guint clist_signals[LAST_SIGNAL] = {0};
|
||||
|
||||
@@ -521,6 +523,7 @@ gtk_clist_class_init (GtkCListClass * klass)
|
||||
widget_class->focus_in_event = gtk_clist_focus_in;
|
||||
widget_class->focus_out_event = gtk_clist_focus_out;
|
||||
widget_class->draw_focus = gtk_clist_draw_focus;
|
||||
widget_class->style_set = gtk_clist_style_set;
|
||||
|
||||
/* container_class->add = NULL; use the default GtkContainerClass warning */
|
||||
/* container_class->remove = NULL; use the default GtkContainerClass warning */
|
||||
@@ -6065,3 +6068,27 @@ selection_find (GtkCList *clist,
|
||||
{
|
||||
return g_list_find (clist->selection, GINT_TO_POINTER (row_number));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_clist_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GdkRectangle area;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
!GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
gtk_style_set_background (widget->style, widget->window, widget->state);
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_window_clear (widget->window);
|
||||
}
|
||||
if (GTK_CLIST(widget)->vscrollbar)
|
||||
gtk_widget_queue_draw(GTK_CLIST(widget)->vscrollbar);
|
||||
if (GTK_CLIST(widget)->hscrollbar)
|
||||
gtk_widget_queue_draw(GTK_CLIST(widget)->hscrollbar);
|
||||
area.x = 0;
|
||||
area.y = 0;
|
||||
area.width = widget->allocation.width;
|
||||
area.height = widget->allocation.height;
|
||||
gtk_clist_draw(GTK_CLIST(widget), &area);
|
||||
}
|
||||
|
||||
@@ -2332,6 +2332,8 @@ gtk_entry_style_set (GtkWidget *widget,
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_window_clear (widget->window);
|
||||
|
||||
gtk_widget_queue_draw(widget);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -168,6 +168,8 @@ static GtkType gtk_notebook_child_type (GtkContainer *container);
|
||||
static gint gtk_notebook_find_page (gconstpointer a,
|
||||
gconstpointer b);
|
||||
static void gtk_notebook_set_shape (GtkNotebook *notebook);
|
||||
static void gtk_notebook_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
|
||||
static GtkContainerClass *parent_class = NULL;
|
||||
static guint notebook_signals[LAST_SIGNAL] = { 0 };
|
||||
@@ -253,7 +255,8 @@ gtk_notebook_class_init (GtkNotebookClass *class)
|
||||
widget_class->focus_in_event = gtk_notebook_focus_in;
|
||||
widget_class->focus_out_event = gtk_notebook_focus_out;
|
||||
widget_class->draw_focus = gtk_notebook_draw_focus;
|
||||
|
||||
widget_class->style_set = gtk_notebook_style_set;
|
||||
|
||||
container_class->add = gtk_notebook_add;
|
||||
container_class->remove = gtk_notebook_remove;
|
||||
container_class->foreach = gtk_notebook_foreach;
|
||||
@@ -2139,9 +2142,11 @@ gtk_notebook_draw_arrow (GtkNotebook *notebook, guint arrow)
|
||||
if (notebook->tab_pos == GTK_POS_LEFT ||
|
||||
notebook->tab_pos == GTK_POS_RIGHT)
|
||||
arrow = GTK_ARROW_UP;
|
||||
gtk_draw_arrow (widget->style, notebook->panel, state_type,
|
||||
shadow_type, arrow, TRUE,
|
||||
0, 0, ARROW_SIZE, ARROW_SIZE);
|
||||
gdk_window_clear_area(notebook->panel, 0, 0, ARROW_SIZE, ARROW_SIZE);
|
||||
gtk_paint_arrow (widget->style, notebook->panel, state_type,
|
||||
shadow_type, NULL, GTK_WIDGET(notebook), "notebook",
|
||||
arrow, TRUE,
|
||||
0, 0, ARROW_SIZE, ARROW_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2154,9 +2159,12 @@ gtk_notebook_draw_arrow (GtkNotebook *notebook, guint arrow)
|
||||
if (notebook->tab_pos == GTK_POS_LEFT ||
|
||||
notebook->tab_pos == GTK_POS_RIGHT)
|
||||
arrow = GTK_ARROW_DOWN;
|
||||
gtk_draw_arrow (widget->style, notebook->panel, state_type,
|
||||
shadow_type, arrow, TRUE, ARROW_SIZE + ARROW_SPACING,
|
||||
0, ARROW_SIZE, ARROW_SIZE);
|
||||
gdk_window_clear_area(notebook->panel, ARROW_SIZE + ARROW_SPACING,
|
||||
0, ARROW_SIZE, ARROW_SIZE);
|
||||
gtk_paint_arrow (widget->style, notebook->panel, state_type,
|
||||
shadow_type, NULL, GTK_WIDGET(notebook), "notebook",
|
||||
arrow, TRUE, ARROW_SIZE + ARROW_SPACING,
|
||||
0, ARROW_SIZE, ARROW_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3345,3 +3353,18 @@ gtk_notebook_set_shape (GtkNotebook *notebook)
|
||||
gdk_pixmap_unref(pm);
|
||||
gdk_gc_destroy(pmgc);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
!GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
gtk_style_set_background (widget->style, widget->window, widget->state);
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_window_clear (widget->window);
|
||||
}
|
||||
gtk_widget_queue_draw(widget);
|
||||
gtk_notebook_set_shape(GTK_NOTEBOOK(widget));
|
||||
}
|
||||
|
||||
@@ -1463,7 +1463,7 @@ gtk_range_style_set (GtkWidget *widget,
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
!GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
if (range->trough)
|
||||
if (range->trough)
|
||||
{
|
||||
gtk_style_set_background (widget->style, range->trough, GTK_STATE_ACTIVE);
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
@@ -1483,5 +1483,7 @@ gtk_range_style_set (GtkWidget *widget,
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_window_clear (range->step_back);
|
||||
}
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gdk_window_clear (widget->window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ static void gtk_viewport_adjustment_changed (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
static void gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
static void gtk_viewport_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
|
||||
static GtkBinClass *parent_class;
|
||||
|
||||
@@ -122,7 +124,8 @@ gtk_viewport_class_init (GtkViewportClass *class)
|
||||
widget_class->expose_event = gtk_viewport_expose;
|
||||
widget_class->size_request = gtk_viewport_size_request;
|
||||
widget_class->size_allocate = gtk_viewport_size_allocate;
|
||||
|
||||
widget_class->style_set = gtk_viewport_style_set;
|
||||
|
||||
container_class->add = gtk_viewport_add;
|
||||
}
|
||||
|
||||
@@ -767,3 +770,28 @@ gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
|
||||
child_allocation.y);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_viewport_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GtkViewport *viewport;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
!GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
viewport = GTK_VIEWPORT (widget);
|
||||
|
||||
gtk_style_set_background (widget->style, viewport->bin_window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, widget->window, widget->state);
|
||||
gtk_paint_flat_box(widget->style, viewport->bin_window, GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE,
|
||||
NULL, widget, "viewportbin",
|
||||
0, 0, -1, -1);
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
gdk_window_clear (widget->window);
|
||||
gdk_window_clear (viewport->bin_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,8 @@ static void gtk_window_draw (GtkWidget *widget,
|
||||
GdkRectangle *area);
|
||||
static gint gtk_window_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static void gtk_window_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
|
||||
|
||||
|
||||
@@ -178,6 +180,7 @@ gtk_window_class_init (GtkWindowClass *klass)
|
||||
widget_class->focus_in_event = gtk_window_focus_in_event;
|
||||
widget_class->focus_out_event = gtk_window_focus_out_event;
|
||||
widget_class->client_event = gtk_window_client_event;
|
||||
widget_class->style_set = gtk_window_style_set;
|
||||
|
||||
widget_class->draw = gtk_window_draw;
|
||||
widget_class->expose_event = gtk_window_expose;
|
||||
@@ -1211,3 +1214,25 @@ gtk_window_draw (GtkWidget *widget,
|
||||
GTK_SHADOW_NONE, area, widget, "base", 0, 0, -1, -1);
|
||||
gtk_widget_draw (GTK_BIN (widget)->child, area);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_window_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
GdkRectangle area;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget) &&
|
||||
!GTK_WIDGET_NO_WINDOW (widget))
|
||||
{
|
||||
gtk_style_set_background (widget->style, widget->window, widget->state);
|
||||
|
||||
area.x = 0;
|
||||
area.y = 0;
|
||||
area.width = widget->allocation.width;
|
||||
area.height = widget->allocation.height;
|
||||
gtk_window_draw(widget, &area);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gdk_window_clear (widget->window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ style "default"
|
||||
{
|
||||
# fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
|
||||
font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
|
||||
engine "th" {
|
||||
name = "Sssaample"
|
||||
}
|
||||
engine "th" {
|
||||
name = "Sssaample"
|
||||
}
|
||||
}
|
||||
|
||||
style "window"
|
||||
|
||||
@@ -19,9 +19,9 @@ style "default"
|
||||
{
|
||||
# fontset = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*,*"
|
||||
font = "-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*"
|
||||
engine "th" {
|
||||
name = "Sssaample"
|
||||
}
|
||||
engine "th" {
|
||||
name = "Sssaample"
|
||||
}
|
||||
}
|
||||
|
||||
style "window"
|
||||
|
||||
@@ -1673,7 +1673,8 @@ draw_flat_box (GtkStyle *style,
|
||||
gdk_window_clear_area(window,x,y,width,height);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
/*
|
||||
if (area)
|
||||
gdk_draw_rectangle(window, style->bg_gc[state_type], TRUE,
|
||||
new_area.x, new_area.y,
|
||||
@@ -1681,6 +1682,7 @@ draw_flat_box (GtkStyle *style,
|
||||
else
|
||||
gdk_draw_rectangle(window, style->bg_gc[state_type], TRUE,
|
||||
x, y, width, height);
|
||||
*/
|
||||
switch (shadow_type)
|
||||
{
|
||||
case GTK_SHADOW_NONE:
|
||||
|
||||
Reference in New Issue
Block a user