mirror of https://github.com/daleclack/My_GtkUi
Convert mydock.ui to gtk4
This commit is contained in:
parent
1143e0921e
commit
8fcee10f63
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||||
|
<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
|
||||||
|
<cambalache-project version="0.10.3" target_tk="gtk-4.0">
|
||||||
|
<ui>
|
||||||
|
(1,None,"test.ui","test.ui",None,None,None,None,None,None)
|
||||||
|
</ui>
|
||||||
|
<object>
|
||||||
|
(1,1,"GtkWindow",None,None,None,None,None,None),
|
||||||
|
(1,2,"GtkButton",None,1,None,None,None,None),
|
||||||
|
(1,3,"GtkImage","image1",None,None,None,None,None)
|
||||||
|
</object>
|
||||||
|
<object_property>
|
||||||
|
(1,2,"GtkButton","child","3",None,None,None,None,None),
|
||||||
|
(1,3,"GtkImage","icon-name","org.gtk.Demo4",None,None,None,None,None),
|
||||||
|
(1,3,"GtkImage","pixel-size","48",None,None,None,None,None)
|
||||||
|
</object_property>
|
||||||
|
</cambalache-project>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<!-- Created with Cambalache 0.10.3 -->
|
||||||
|
<interface>
|
||||||
|
<!-- interface-name test.ui -->
|
||||||
|
<requires lib="gtk" version="4.6"/>
|
||||||
|
<object class="GtkWindow">
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton">
|
||||||
|
<property name="child">image1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="image1">
|
||||||
|
<property name="icon-name">org.gtk.Demo4</property>
|
||||||
|
<property name="pixel-size">48</property>
|
||||||
|
</object>
|
||||||
|
</interface>
|
|
@ -34,8 +34,8 @@
|
||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="receives-default">True</property>
|
<property name="receives-default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="image-position">top</property>
|
|
||||||
<property name="always-show-image">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
|
@ -51,8 +51,8 @@
|
||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="receives-default">True</property>
|
<property name="receives-default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="image-position">top</property>
|
|
||||||
<property name="always-show-image">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">3</property>
|
<property name="left-attach">3</property>
|
||||||
|
@ -68,8 +68,8 @@
|
||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="receives-default">True</property>
|
<property name="receives-default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="image-position">top</property>
|
|
||||||
<property name="always-show-image">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">1</property>
|
||||||
|
@ -85,8 +85,8 @@
|
||||||
<property name="can-focus">True</property>
|
<property name="can-focus">True</property>
|
||||||
<property name="receives-default">True</property>
|
<property name="receives-default">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="image-position">top</property>
|
|
||||||
<property name="always-show-image">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">3</property>
|
<property name="left-attach">3</property>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,7 +52,7 @@ Drawing::Drawing()
|
||||||
// Color set panel
|
// Color set panel
|
||||||
size_adj = Gtk::Adjustment::create(3.0, 1.0, 20.0);
|
size_adj = Gtk::Adjustment::create(3.0, 1.0, 20.0);
|
||||||
scale.set_adjustment(size_adj);
|
scale.set_adjustment(size_adj);
|
||||||
scale.set_value_pos(Gtk::POS_BOTTOM);
|
scale.set_value_pos(Gtk::PositionType::BOTTOM);
|
||||||
btn_box.append(fill_check);
|
btn_box.append(fill_check);
|
||||||
btn_box.append(fill_btn);
|
btn_box.append(fill_btn);
|
||||||
btn_box.append(main_label);
|
btn_box.append(main_label);
|
||||||
|
@ -62,8 +62,8 @@ Drawing::Drawing()
|
||||||
btn_box.append(btn_save);
|
btn_box.append(btn_save);
|
||||||
btn_box.append(btn_clear);
|
btn_box.append(btn_clear);
|
||||||
btn_box.append(btn_exit);
|
btn_box.append(btn_exit);
|
||||||
btn_box.set_halign(Gtk::ALIGN_CENTER);
|
btn_box.set_halign(Gtk::Align::CENTER);
|
||||||
btn_box.set_valign(Gtk::ALIGN_CENTER);
|
btn_box.set_valign(Gtk::Align::CENTER);
|
||||||
|
|
||||||
// Add Gesture
|
// Add Gesture
|
||||||
btn_clear.signal_clicked().connect(sigc::mem_fun(*this, &Drawing::btnclear_clicked));
|
btn_clear.signal_clicked().connect(sigc::mem_fun(*this, &Drawing::btnclear_clicked));
|
||||||
|
@ -81,7 +81,7 @@ Drawing::Drawing()
|
||||||
press->signal_pressed().connect(sigc::mem_fun(*this, &Drawing::button_press));
|
press->signal_pressed().connect(sigc::mem_fun(*this, &Drawing::button_press));
|
||||||
|
|
||||||
// Create a Surface
|
// Create a Surface
|
||||||
surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 600, 480);
|
surface = Cairo::ImageSurface::create(Cairo::Surface::Format::ARGB32, 600, 480);
|
||||||
|
|
||||||
// Set Default Color
|
// Set Default Color
|
||||||
m_color.set_blue(0);
|
m_color.set_blue(0);
|
||||||
|
|
|
@ -43,9 +43,9 @@ MineSweeper::MineSweeper()
|
||||||
btnexit.signal_clicked().connect(sigc::mem_fun(*this, &MineSweeper::hide));
|
btnexit.signal_clicked().connect(sigc::mem_fun(*this, &MineSweeper::hide));
|
||||||
|
|
||||||
// Pack widgets
|
// Pack widgets
|
||||||
status_label.set_halign(Gtk::ALIGN_CENTER);
|
status_label.set_halign(Gtk::Align::CENTER);
|
||||||
btn_box.set_halign(Gtk::ALIGN_CENTER);
|
btn_box.set_halign(Gtk::Align::CENTER);
|
||||||
mine_grid.set_halign(Gtk::ALIGN_CENTER);
|
mine_grid.set_halign(Gtk::Align::CENTER);
|
||||||
main_box.append(status_label);
|
main_box.append(status_label);
|
||||||
main_box.append(mine_grid);
|
main_box.append(mine_grid);
|
||||||
main_box.append(btn_box);
|
main_box.append(btn_box);
|
||||||
|
|
|
@ -14,8 +14,8 @@ GtkRunner::GtkRunner() : hbox(Gtk::Orientation::HORIZONTAL, 5),
|
||||||
set_default_response(Gtk::RESPONSE_OK);
|
set_default_response(Gtk::RESPONSE_OK);
|
||||||
|
|
||||||
// Initalize Box
|
// Initalize Box
|
||||||
hbox.set_halign(Gtk::ALIGN_CENTER);
|
hbox.set_halign(Gtk::Align::CENTER);
|
||||||
hbox.set_valign(Gtk::ALIGN_CENTER);
|
hbox.set_valign(Gtk::Align::CENTER);
|
||||||
hbox.append(app_entry);
|
hbox.append(app_entry);
|
||||||
hbox.append(open_btn);
|
hbox.append(open_btn);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue