mirror of https://github.com/daleclack/My_GtkUi
Convert internal images to xpm to png
This commit is contained in:
parent
b071c1ebaa
commit
c8320fbf11
|
@ -49,6 +49,8 @@ set(RESOURCE_LIST
|
|||
STRIPBLANKS win_input.ui
|
||||
STRIPBLANKS scoreswin.ui
|
||||
STRIPBLANKS mine_menu.xml
|
||||
img7.png
|
||||
winpe.png
|
||||
login_style.css
|
||||
mine_style.css
|
||||
style.css
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 402 KiB |
Binary file not shown.
After Width: | Height: | Size: 307 KiB |
|
@ -1,10 +1,13 @@
|
|||
#include "MyPrefs.hh"
|
||||
#include "winpe.xpm"
|
||||
#include "img7.xpm"
|
||||
// #include "winpe.xpm"
|
||||
// #include "img7.xpm"
|
||||
#include "image_types.hh"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#define winpe "/org/gtk/daleclack/winpe.png"
|
||||
#define img7 "/org/gtk/daleclack/img7.png"
|
||||
|
||||
MyPrefs::MyPrefs()
|
||||
: main_box(Gtk::ORIENTATION_VERTICAL, 10),
|
||||
views_box(Gtk::ORIENTATION_HORIZONTAL, 5),
|
||||
|
@ -398,10 +401,11 @@ void MyPrefs::images_view_changed()
|
|||
}
|
||||
}
|
||||
|
||||
void MyPrefs::set_background_internal(const char *const *data)
|
||||
void MyPrefs::set_background_internal(const char *data)
|
||||
{
|
||||
// Set a internal background
|
||||
auto pixbuf = Gdk::Pixbuf::create_from_xpm_data(data);
|
||||
// auto pixbuf = Gdk::Pixbuf::create_from_xpm_data(data);
|
||||
auto pixbuf = Gdk::Pixbuf::create_from_resource(data);
|
||||
auto sized = pixbuf->scale_simple(width, height, Gdk::INTERP_BILINEAR);
|
||||
gtk_image_set_from_pixbuf(background1->gobj(), sized->gobj());
|
||||
pixbuf.reset();
|
||||
|
|
|
@ -114,7 +114,7 @@ private:
|
|||
|
||||
// Update the background
|
||||
void update_images_view(std::string &folder_path);
|
||||
void set_background_internal(const char *const *data);
|
||||
void set_background_internal(const char *data);
|
||||
void set_background_file();
|
||||
|
||||
// Resoulution page
|
||||
|
|
Loading…
Reference in New Issue