Skip to content

Commit

Permalink
Fix TopPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
daleclack committed Feb 11, 2022
1 parent 4d5f832 commit 9d30208
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Gtk3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.0.0)
project(My_GtkUi VERSION 2.6.0)
project(My_GtkUi VERSION 2.7.0)

include(CTest)
enable_testing()
Expand Down Expand Up @@ -32,6 +32,14 @@ add_custom_command(
${GRESOURCE_XML}
--target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
--generate-source
DEPENDS
${CMAKE_SOURCE_DIR}/res/game1.ui
${CMAKE_SOURCE_DIR}/res/title.ui
${CMAKE_SOURCE_DIR}/res/toppanel.ui
${CMAKE_SOURCE_DIR}/res/win_size.ui
${CMAKE_SOURCE_DIR}/res/win1.ui
${CMAKE_SOURCE_DIR}/res/window.ui
${CMAKE_SOURCE_DIR}/res/gtk42.resource.xml
)

# Step 3:
Expand Down
1 change: 1 addition & 0 deletions Gtk3/res/gtk42.resource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<file preprocess="xml-stripblanks">toppanel.ui</file>
<file preprocess="xml-stripblanks">win_size.ui</file>
<file preprocess="xml-stripblanks">win1.ui</file>
<file preprocess="xml-stripblanks">title.ui</file>
<file preprocess="xml-stripblanks">game1.ui</file>
</gresource>
</gresources>
2 changes: 1 addition & 1 deletion Gtk3/res/title.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkButtonBox">
<object class="GtkButtonBox" id="titlebox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">start</property>
Expand Down
5 changes: 5 additions & 0 deletions Gtk3/src/panel1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ void add_toppanel(GtkBuilder *builder,GtkFixed *fixed){
GObject *window=gtk_builder_get_object(builder,"window");
g_signal_connect_swapped(btn_exit,"clicked",G_CALLBACK(gtk_widget_destroy),window);
gtk_fixed_put(fixed,GTK_WIDGET(panel1),0,0);

//Add Title Panel
GtkBuilder *titlebuilder=gtk_builder_new_from_resource("/gtk42/title.ui");
GObject *titlebox=gtk_builder_get_object(titlebuilder,"titlebox");
gtk_fixed_put(fixed,GTK_WIDGET(titlebox),0,0);
}
2 changes: 1 addition & 1 deletion Gtk3/src/win1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void win1_init(GtkWidget *widget,GtkWindow *parent){
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(window1),logo_sized);
//Add version information
char *version;
version=g_strdup_printf("2.6\nRunning Against Gtk %d.%d.%d",
version=g_strdup_printf("2.7\nRunning Against Gtk %d.%d.%d",
gtk_get_major_version(),
gtk_get_minor_version(),
gtk_get_micro_version());
Expand Down

0 comments on commit 9d30208

Please sign in to comment.