Closed rbuj closed 4 years ago
personally, I prefer instead to make sure the dialog comes from the terminal
@sc0w done.
I prefer to use the previous used styleclass
linked
for the buttonbox
.
See gtk-inspector on master branch.
In this case the css selector is
buttonbox.linked.horizontal.dialog-action-area button.default.text-button {}
Modern gtk themes like Menta Blue-Submarine or adwita use the linked
styleclass for buttons, in result buttons are sorted to left/middle/right buttons, and you can drop the space between buttons by a gtk-theme.
Eg. Blue-submarine
https://github.com/mate-desktop/mate-themes/blob/master/desktop-themes/Blue-Submarine/gtk-3.0/gtk-widgets.css#L1560
Oldschool themes like Traditional themes don't have the linked button style.
It is possible to add this style class to GtkButtonBox
in glade file to restore previous behaviour.
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<cut>
</child>
<style>
<class name="linked"/>
</style>
@raveit65 done.
@raveit65 Do you agree to expand the button box, remove window title like in the screenshot below?
diff --git a/src/confirm-close-dialog.ui b/src/confirm-close-dialog.ui
index 624bf66..999a552 100644
--- a/src/confirm-close-dialog.ui
+++ b/src/confirm-close-dialog.ui
@@ -15,11 +15,9 @@
<object class="GtkDialog" id="confirm_close_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
- <property name="title" translatable="yes">Confirm Close</property>
<property name="modal">True</property>
<property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
- <property name="icon_name">utilities-terminal</property>
<property name="type_hint">dialog</property>
<child type="titlebar">
<placeholder/>
@@ -34,7 +32,9 @@
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="hexpand">True</property>
+ <property name="homogeneous">True</property>
+ <property name="layout_style">expand</property>
<child>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">_Cancel</property>
@@ -74,7 +74,7 @@
</style>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 63f8580..2a5e9b0 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -3640,7 +3640,7 @@ confirm_close_window_or_tab (TerminalWindow *window,
G_CALLBACK (confirm_close_response_cb), window);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
-
+ gtk_window_set_title (GTK_WINDOW (dialog), "");
gtk_window_present (GTK_WINDOW (dialog));
return TRUE;
Dialog looks good, good idea to expand the buttonbox . +1
@raveit65 done.
@rbuj with this PR the dialog is shown at the center of the monitor, and without this PR the dialog is shown at the center of the mate-terminal window
please, can you respect old behavior to show the dialog at the center of the window?
@sc0w done.
Before
After