Add Dock
|
@ -28,7 +28,14 @@ set(RESOURCE_LIST
|
|||
menubar.xml
|
||||
style.css
|
||||
reset.css
|
||||
dock.ui)
|
||||
dock.ui
|
||||
icons/48x48/actions/My_GtkUI.png
|
||||
icons/scalable/status/file-manager.svg
|
||||
icons/scalable/status/qemu-launcher.svg
|
||||
icons/scalable/status/qq.svg
|
||||
icons/scalable/status/qqmusic.svg
|
||||
icons/scalable/status/utilities-system-monitor.svg
|
||||
icons/scalable/status/baidunetdisk.svg)
|
||||
|
||||
compile_gresources(RESOURCE_FILE
|
||||
XML_OUT
|
||||
|
@ -49,7 +56,7 @@ if(WIN32)
|
|||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||
set(app_WINRC ../icon.rc)
|
||||
set_property(SOURCE ../icon.rc APPEND PROPERTY
|
||||
OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/../icon.ico
|
||||
OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/icon.ico
|
||||
)
|
||||
add_executable(${PROJECT_NAME} WIN32 ${app_WINRC} ${SOURCES} ${RESOURCE_FILE})
|
||||
else()
|
||||
|
|
After Width: | Height: | Size: 9.4 KiB |
|
@ -0,0 +1 @@
|
|||
MAINICON ICON "Icon.ico"
|
|
@ -15,23 +15,76 @@
|
|||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="icon-name">vlc</property>
|
||||
<property name="icon-name">baidunetdisk</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkButton">
|
||||
<property name="focusable">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="icon-name">qq</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkButton">
|
||||
<property name="focusable">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="icon-name">file-manager</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkButton">
|
||||
<property name="focusable">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="icon-name">qqmusic</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkButton">
|
||||
<property name="focusable">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="icon-name">utilities-system-monitor</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="focusable">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-frame">0</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="icon-name">qemu</property>
|
||||
<property name="pixel-size">48</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
|
|
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -21,7 +21,7 @@ static gboolean label_timer(gpointer data)
|
|||
|
||||
// Set Label time
|
||||
char buf[57];
|
||||
sprintf(buf, "%d:%d %d/%d/%d", local->tm_hour,
|
||||
sprintf(buf, "%02d:%02d %d/%d/%d", local->tm_hour,
|
||||
local->tm_min, local->tm_year + 1900, local->tm_mon + 1, local->tm_mday);
|
||||
gtk_label_set_label(GTK_LABEL(data), buf);
|
||||
|
||||
|
@ -32,16 +32,16 @@ static void main_win_init(MainWin *win)
|
|||
{
|
||||
// Initalize window
|
||||
gtk_window_set_title(GTK_WINDOW(win), "My GtkUI Flos Version");
|
||||
gtk_window_set_default_size(GTK_WINDOW(win), 800, 450);
|
||||
gtk_window_set_icon_name(GTK_WINDOW(win), "org.gtk.daleclack");
|
||||
gtk_window_set_icon_name(GTK_WINDOW(win), "My_GtkUI");
|
||||
|
||||
// Create widgets
|
||||
win->overlay = gtk_overlay_new();
|
||||
win->background = gtk_picture_new();
|
||||
gtk_widget_set_size_request(win->overlay, 1024, 576);
|
||||
|
||||
// Add Background
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_resource("/org/gtk/daleclack/flos.png", NULL);
|
||||
GdkPixbuf *sized = gdk_pixbuf_scale_simple(pixbuf, 800, 450, GDK_INTERP_BILINEAR);
|
||||
GdkPixbuf *sized = gdk_pixbuf_scale_simple(pixbuf, 1024, 576, GDK_INTERP_BILINEAR);
|
||||
gtk_picture_set_pixbuf(GTK_PICTURE(win->background), sized);
|
||||
g_object_unref(pixbuf);
|
||||
g_object_unref(sized);
|
||||
|
|