New graphix.
authorwellu <wellu@wellu.org>
Fri, 10 Oct 2008 16:16:38 +0000 (16:16 +0000)
committerwellu <wellu@wellu.org>
Fri, 10 Oct 2008 16:16:38 +0000 (16:16 +0000)
git-svn-id: file:///svnroot/speedometer/trunk@47 df364472-da61-43ef-8a67-511c89aa921b

19 files changed:
callbacks.c
data/0.png
data/1.png
data/2.png
data/3.png
data/4.png
data/5.png
data/6.png
data/7.png
data/8.png
data/9.png
data/big.xcf
data/fs.png
data/kmh.png
data/mph.png
data/ms.png
icons/icon.xcf
icons/speedometer-64.png
ui.c

index 0cf0792..9159c60 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <hildon/hildon-banner.h>
 #include <math.h>
+#include <glib.h>
 
 #include "callbacks.h"
 #include "appdata.h"
index 1732e94..7b1a97f 100644 (file)
Binary files a/data/0.png and b/data/0.png differ
index 5ce4955..094a59c 100644 (file)
Binary files a/data/1.png and b/data/1.png differ
index 94980ad..4cff46a 100644 (file)
Binary files a/data/2.png and b/data/2.png differ
index 8ce7396..d19f3b7 100644 (file)
Binary files a/data/3.png and b/data/3.png differ
index 93e12ad..e357bed 100644 (file)
Binary files a/data/4.png and b/data/4.png differ
index 954b1ad..f93428a 100644 (file)
Binary files a/data/5.png and b/data/5.png differ
index f0a7f48..2e578a0 100644 (file)
Binary files a/data/6.png and b/data/6.png differ
index 7fcf2e0..9aacef3 100644 (file)
Binary files a/data/7.png and b/data/7.png differ
index dba06a4..673fa4e 100644 (file)
Binary files a/data/8.png and b/data/8.png differ
index 722a11a..85b3059 100644 (file)
Binary files a/data/9.png and b/data/9.png differ
index b993ce4..36ebe67 100644 (file)
Binary files a/data/big.xcf and b/data/big.xcf differ
index 03e64c1..1385cf5 100644 (file)
Binary files a/data/fs.png and b/data/fs.png differ
index 795547f..f4812f0 100644 (file)
Binary files a/data/kmh.png and b/data/kmh.png differ
index 0267895..686cd56 100644 (file)
Binary files a/data/mph.png and b/data/mph.png differ
index 3254766..8292458 100644 (file)
Binary files a/data/ms.png and b/data/ms.png differ
index 07be141..a6a5a9d 100644 (file)
Binary files a/icons/icon.xcf and b/icons/icon.xcf differ
index 646f1df..92ba5df 100644 (file)
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 (file)
--- 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));