Fix style for dock

This commit is contained in:
daleclack 2024-03-23 23:20:39 +08:00
parent 393c5e3d01
commit 809db2f362
3 changed files with 12 additions and 3 deletions

View File

@ -18,7 +18,7 @@ label{
button{ button{
color:white; color:white;
border: 0; border: 0px;
} }
button:hover{ button:hover{

View File

@ -27,6 +27,7 @@ MyDock::MyDock(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &ref_Gl
ref_builder->get_widget("btngame24", btngame24); ref_builder->get_widget("btngame24", btngame24);
ref_builder->get_widget("btncalc", btncalc); ref_builder->get_widget("btncalc", btncalc);
ref_builder->get_widget("btnmine", btnmine); ref_builder->get_widget("btnmine", btnmine);
ref_builder->get_widget("btntrash", btntrash);
ref_builder->get_widget("separator_start", separator_start); ref_builder->get_widget("separator_start", separator_start);
ref_builder->get_widget("separator_2", separator_2); ref_builder->get_widget("separator_2", separator_2);
ref_builder->get_widget("separator_3", separator_3); ref_builder->get_widget("separator_3", separator_3);
@ -136,6 +137,14 @@ MyDock::MyDock(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &ref_Gl
{ {
apply_style(*childrens1[i]); apply_style(*childrens1[i]);
} }
// Apply style for icons box
auto childrens2 = icons_box->get_children();
for(int i = 0; i < childrens2.size(); i++)
{
apply_style(*childrens2[i]);
}
apply_style(*btntrash);
// apps_grid->foreach(sigc::mem_fun(*this,&MyDock::apply_style)); // apps_grid->foreach(sigc::mem_fun(*this,&MyDock::apply_style));
// Set dock position // Set dock position

View File

@ -25,8 +25,8 @@ public:
private: private:
// Child widgets // Child widgets
Gtk::Box *finder_box, *dock_box, *dock_left, *dock_right, *dock_bottom, *icons_box; Gtk::Box *finder_box, *dock_box, *dock_left, *dock_right, *dock_bottom, *icons_box;
Gtk::Button *btnlaunch, *btndraw, *btnfiles, *btncalc, Gtk::Button *btnlaunch, *btndraw, *btnfiles, *btncalc, *btngame,
*btngame, *btnedit, *btnimage, *btnset, *btngame24, *btnmine; *btnedit, *btnimage, *btnset, *btngame24, *btnmine, *btntrash;
Gtk::Separator *separator_start, *separator_2, *separator_3, *separator_end; Gtk::Separator *separator_start, *separator_2, *separator_3, *separator_end;
Gtk::ScrolledWindow *icons_sw; Gtk::ScrolledWindow *icons_sw;