diff --git a/Gtk4/gtk160_wayland_test/res/title_style.css b/Gtk4/gtk160_wayland_test/res/title_style.css index 9ed0a98..da00688 100644 --- a/Gtk4/gtk160_wayland_test/res/title_style.css +++ b/Gtk4/gtk160_wayland_test/res/title_style.css @@ -2,8 +2,8 @@ .mytitlebar { min-height: 10px; margin: 0px; - padding-top: 3px; - padding-bottom: 3px; + padding-top: 1px; + padding-bottom: 1px; } .mytitlebar label{ @@ -16,12 +16,14 @@ .ctrl_btn { min-height: 8px; - min-width: 13px; + min-width: 14px; margin: 0px; font-weight: 900; border-radius: 100%; padding-top: 0px; padding-bottom: 0px; + padding-left: 1px; + padding-right: 1px; } .ctrl_btn:hover{ diff --git a/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp b/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp index d51bda9..4ce01be 100644 --- a/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp +++ b/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp @@ -37,13 +37,15 @@ static void my_titlebar_init(MyTitleBar *self) gtk_header_bar_set_show_title_buttons(GTK_HEADER_BAR(self->header), FALSE); // Add a close button - self->btn_close = gtk_button_new_with_label("\u00d7"); + // self->btn_close = gtk_button_new_with_label("\u00d7"); + self->btn_close = gtk_button_new_from_icon_name("window-close-symbolic"); gtk_widget_set_css_classes(self->btn_close, NULL); gtk_widget_add_css_class(self->btn_close, "ctrl_btn"); + gtk_widget_add_css_class(self->btn_close, "close"); gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_close); // Add a minimize button - self->btn_mini = gtk_button_new_with_label("-"); + self->btn_mini = gtk_button_new_from_icon_name("window-minimize-symbolic"); gtk_widget_set_css_classes(self->btn_mini, NULL); gtk_widget_add_css_class(self->btn_mini, "ctrl_btn"); gtk_header_bar_pack_start(GTK_HEADER_BAR(self->header), self->btn_mini);