pinosaur
/
surf.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moving color definitions to config.h
[surf.git]
/
surf.c
diff --git
a/surf.c
b/surf.c
index
bf489b9
..
9a67c04
100644
(file)
--- a/
surf.c
+++ b/
surf.c
@@
-179,17
+179,29
@@
void
drawindicator(Client *c) {
GtkWidget *w;
gint width;
drawindicator(Client *c) {
GtkWidget *w;
gint width;
+ GdkGC *gc;
+ gchar *uri;
+
+ uri = geturi(c);
w = c->indicator;
width = c->progress * w->allocation.width / 100;
w = c->indicator;
width = c->progress * w->allocation.width / 100;
+
+ gc = gdk_gc_new(w->window);
+
+ if(strstr(uri, "https://") == uri)
+ gdk_gc_set_rgb_fg_color(gc, &progress_trust);
+ else
+ gdk_gc_set_rgb_fg_color(gc, &progress);
gdk_draw_rectangle(w->window,
gdk_draw_rectangle(w->window,
- w->style->
f
g_gc[GTK_WIDGET_STATE(w)],
+ w->style->
b
g_gc[GTK_WIDGET_STATE(w)],
TRUE,
0, 0, w->allocation.width, w->allocation.height);
gdk_draw_rectangle(w->window,
TRUE,
0, 0, w->allocation.width, w->allocation.height);
gdk_draw_rectangle(w->window,
-
w->style->bg_gc[GTK_WIDGET_STATE(w)]
,
+
gc
,
TRUE,
0, 0, width, w->allocation.height);
TRUE,
0, 0, width, w->allocation.height);
+ g_object_unref(gc);/*g_free(gc);*/
}
gboolean
}
gboolean
@@
-403,7
+415,7
@@
newclient(void) {
/* indicator */
c->indicator = gtk_drawing_area_new();
/* indicator */
c->indicator = gtk_drawing_area_new();
- gtk_widget_set_size_request(c->indicator, 800,
5
);
+ gtk_widget_set_size_request(c->indicator, 800,
2
);
g_signal_connect (G_OBJECT (c->indicator), "expose_event",
G_CALLBACK (exposeindicator), c);
g_signal_connect (G_OBJECT (c->indicator), "expose_event",
G_CALLBACK (exposeindicator), c);