diff --git a/Gtk4_Reset/CMakeLists.txt b/Gtk4_Reset/CMakeLists.txt index 1f5e170..52f4bea 100644 --- a/Gtk4_Reset/CMakeLists.txt +++ b/Gtk4_Reset/CMakeLists.txt @@ -53,6 +53,8 @@ set(RESOURCE_LIST STRIPBLANKS mine_menu.xml shizuku.png final_approach.png + img7.png + winpe.png style.css style_dark.css mine_app.css diff --git a/Gtk4_Reset/res/final_approach.png b/Gtk4_Reset/res/final_approach.png index 0d38104..0fa2ab1 100644 Binary files a/Gtk4_Reset/res/final_approach.png and b/Gtk4_Reset/res/final_approach.png differ diff --git a/Gtk4_Reset/res/img7.png b/Gtk4_Reset/res/img7.png new file mode 100644 index 0000000..e7aeac5 Binary files /dev/null and b/Gtk4_Reset/res/img7.png differ diff --git a/Gtk4_Reset/res/winpe.png b/Gtk4_Reset/res/winpe.png new file mode 100644 index 0000000..2f464e5 Binary files /dev/null and b/Gtk4_Reset/res/winpe.png differ diff --git a/Gtk4_Reset/src/core/MyStack.cpp b/Gtk4_Reset/src/core/MyStack.cpp index ab8d067..ba8bfd8 100644 --- a/Gtk4_Reset/src/core/MyStack.cpp +++ b/Gtk4_Reset/src/core/MyStack.cpp @@ -2,7 +2,7 @@ #include "MyStack.h" #include "MyDock.h" #include "MyPrefs.h" -#include "winpe.xpm" +// #include "winpe.xpm" static GtkWidget *dock; @@ -103,7 +103,7 @@ void create_main_stack(GtkWindow *win) GtkWidget *btnlogin = GTK_WIDGET(gtk_builder_get_object(builder, "btnlogin")); // Add background for login page - GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data(winpe); + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_resource("/org/gtk/daleclack/winpe.png", NULL); GdkPixbuf *sized = gdk_pixbuf_scale_simple(pixbuf, 1024, 576, GDK_INTERP_BILINEAR); GdkTexture *texture = gdk_texture_new_for_pixbuf(sized); GtkWidget *login_pic = gtk_picture_new_for_paintable(GDK_PAINTABLE(texture)); diff --git a/Gtk4_Reset/src/ui/MyPrefs.cpp b/Gtk4_Reset/src/ui/MyPrefs.cpp index b029502..53867a3 100644 --- a/Gtk4_Reset/src/ui/MyPrefs.cpp +++ b/Gtk4_Reset/src/ui/MyPrefs.cpp @@ -1,7 +1,7 @@ #include "MyPrefs.h" #include "MyItem.h" -#include "winpe.xpm" -#include "img7.xpm" +// #include "winpe.xpm" +// #include "img7.xpm" #include "image_types.h" #include #include @@ -210,9 +210,9 @@ static void images_list_default(GListStore *store1) g_list_store_append(store1, my_item_new("final_approach.png", ":1", TRUE)); g_list_store_append(store1, - my_item_new("img7.xpm", ":2", TRUE)); + my_item_new("img7.png", ":2", TRUE)); g_list_store_append(store1, - my_item_new("winpe.xpm", ":3", TRUE)); + my_item_new("winpe.png", ":3", TRUE)); g_list_store_append(store1, my_item_new("shizuku.png", ":4", TRUE)); } @@ -368,7 +368,8 @@ static void update_external_image(MyPrefs *prefs, const char *file_name) else { // if file load failed, load default image - update_internal_image(prefs, winpe); + update_resource_image(prefs, "/org/gtk/daleclack/winpe.png"); + // update_internal_image(prefs, winpe); } } @@ -539,10 +540,10 @@ static void load_image(const char *file_name, int image_item_index, update_resource_image(prefs, "/org/gtk/daleclack/final_approach.png"); break; case '2': - update_internal_image(prefs, img7); + update_resource_image(prefs, "/org/gtk/daleclack/img7.png"); break; case '3': - update_internal_image(prefs, winpe); + update_resource_image(prefs, "/org/gtk/daleclack/winpe.png"); break; case '4': update_resource_image(prefs, "/org/gtk/daleclack/shizuku.png");