mirror of https://github.com/daleclack/My_GtkUi
Convert images to png
This commit is contained in:
parent
0ca2fdf29c
commit
9b1ceceebc
|
@ -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
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.6 MiB After Width: | Height: | Size: 2.3 MiB |
Binary file not shown.
After Width: | Height: | Size: 402 KiB |
Binary file not shown.
After Width: | Height: | Size: 307 KiB |
|
@ -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));
|
||||
|
|
|
@ -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 <string>
|
||||
#include <vector>
|
||||
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue