From: wellu Date: Fri, 10 Oct 2008 16:16:38 +0000 (+0000) Subject: New graphix. X-Git-Tag: 0.99~23 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;ds=sidebyside;h=036249ab501214d8b692ef939fe59a93ec081cca;p=speedometer New graphix. git-svn-id: file:///svnroot/speedometer/trunk@47 df364472-da61-43ef-8a67-511c89aa921b --- diff --git a/callbacks.c b/callbacks.c index 0cf0792..9159c60 100644 --- a/callbacks.c +++ b/callbacks.c @@ -18,6 +18,7 @@ #include #include +#include #include "callbacks.h" #include "appdata.h" diff --git a/data/0.png b/data/0.png index 1732e94..7b1a97f 100644 Binary files a/data/0.png and b/data/0.png differ diff --git a/data/1.png b/data/1.png index 5ce4955..094a59c 100644 Binary files a/data/1.png and b/data/1.png differ diff --git a/data/2.png b/data/2.png index 94980ad..4cff46a 100644 Binary files a/data/2.png and b/data/2.png differ diff --git a/data/3.png b/data/3.png index 8ce7396..d19f3b7 100644 Binary files a/data/3.png and b/data/3.png differ diff --git a/data/4.png b/data/4.png index 93e12ad..e357bed 100644 Binary files a/data/4.png and b/data/4.png differ diff --git a/data/5.png b/data/5.png index 954b1ad..f93428a 100644 Binary files a/data/5.png and b/data/5.png differ diff --git a/data/6.png b/data/6.png index f0a7f48..2e578a0 100644 Binary files a/data/6.png and b/data/6.png differ diff --git a/data/7.png b/data/7.png index 7fcf2e0..9aacef3 100644 Binary files a/data/7.png and b/data/7.png differ diff --git a/data/8.png b/data/8.png index dba06a4..673fa4e 100644 Binary files a/data/8.png and b/data/8.png differ diff --git a/data/9.png b/data/9.png index 722a11a..85b3059 100644 Binary files a/data/9.png and b/data/9.png differ diff --git a/data/big.xcf b/data/big.xcf index b993ce4..36ebe67 100644 Binary files a/data/big.xcf and b/data/big.xcf differ diff --git a/data/fs.png b/data/fs.png index 03e64c1..1385cf5 100644 Binary files a/data/fs.png and b/data/fs.png differ diff --git a/data/kmh.png b/data/kmh.png index 795547f..f4812f0 100644 Binary files a/data/kmh.png and b/data/kmh.png differ diff --git a/data/mph.png b/data/mph.png index 0267895..686cd56 100644 Binary files a/data/mph.png and b/data/mph.png differ diff --git a/data/ms.png b/data/ms.png index 3254766..8292458 100644 Binary files a/data/ms.png and b/data/ms.png differ diff --git a/icons/icon.xcf b/icons/icon.xcf index 07be141..a6a5a9d 100644 Binary files a/icons/icon.xcf and b/icons/icon.xcf differ diff --git a/icons/speedometer-64.png b/icons/speedometer-64.png index 646f1df..92ba5df 100644 Binary files a/icons/speedometer-64.png and b/icons/speedometer-64.png differ diff --git a/ui.c b/ui.c index 70a7cfe..6328e7f 100644 --- a/ui.c +++ b/ui.c @@ -77,20 +77,27 @@ void load_graphics() { g_print(path); g_print("\n"); GError* error = NULL; - big_graphics[i] = gdk_pixbuf_new_from_file(path, &error); + big_graphics[i] = gdk_pixbuf_new_from_file_at_scale(path, + 160, + 160, + FALSE, + &error); if(error) { - g_print("Error loading graphics: %s\n", error->message); + g_print("Error loading big graphics: %s\n", error->message); + g_error_free(error); + error = NULL; + } + small_graphics[i] = gdk_pixbuf_new_from_file_at_scale(path, + 120, + 120, + FALSE, + &error); + if(error) { + g_print("Error loading small graphics: %s\n", error->message); g_error_free(error); error = NULL; } g_free(path); - - small_graphics[i] = gdk_pixbuf_scale_simple( - big_graphics[i], - 150, - 150, - GDK_INTERP_BILINEAR); - i++; } g_print("Done\n"); @@ -139,15 +146,16 @@ void create_ui(AppData* appdata) { hbox = gtk_hbox_new(TRUE, 0); bhbox = gtk_hbox_new(TRUE, 0); - GtkWidget* top_e = gtk_event_box_new(); + //GtkWidget* top_e = gtk_event_box_new(); GtkWidget* middle_e = gtk_event_box_new(); GtkWidget* bottom_e = gtk_event_box_new(); +/* g_signal_connect(G_OBJECT(top_e), "button_press_event", G_CALLBACK(top_event_box_button_press), appdata); - +*/ g_signal_connect(G_OBJECT(middle_e), "button_press_event", G_CALLBACK(middle_event_box_button_press), @@ -183,7 +191,7 @@ void create_ui(AppData* appdata) { gtk_container_add(GTK_CONTAINER(bottom_e), bhbox); // add event boxes to the vbox - gtk_box_pack_start_defaults(GTK_BOX(vbox), top_e); + //gtk_box_pack_start_defaults(GTK_BOX(vbox), top_e); gtk_box_pack_start_defaults(GTK_BOX(vbox), middle_e); gtk_box_pack_start_defaults(GTK_BOX(vbox), bottom_e); @@ -193,7 +201,7 @@ void create_ui(AppData* appdata) { // set backgrounds black set_widget_bg_black(GTK_WIDGET(appdata->window)); set_widget_bg_black(bottom_e); - set_widget_bg_black(top_e); + //set_widget_bg_black(top_e); set_widget_bg_black(middle_e); gtk_window_fullscreen(GTK_WINDOW(appdata->window));