xed-searchbar: Fix the size of the searchbar close button
The theming for this changed in gtk3.20+. Get it back to the proper size and theme it in xed-style.css instead of hard coding it.
This commit is contained in:
parent
100428eaf9
commit
a13a573228
|
@ -5,3 +5,9 @@
|
||||||
.xed-map-frame:dir(rtl) border {
|
.xed-map-frame:dir(rtl) border {
|
||||||
border-width: 0 1px 0 0;
|
border-width: 0 1px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xed-searchbar .close-button {
|
||||||
|
padding: 0;
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
|
@ -659,11 +659,8 @@ xed_searchbar_init (XedSearchbar *searchbar)
|
||||||
{
|
{
|
||||||
GtkWidget *content;
|
GtkWidget *content;
|
||||||
GtkSizeGroup *size_group;
|
GtkSizeGroup *size_group;
|
||||||
GtkStyleContext *context;
|
|
||||||
GtkCssProvider *provider;
|
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
gchar *root_objects[] = { "searchbar_content", NULL };
|
gchar *root_objects[] = { "searchbar_content", NULL };
|
||||||
const gchar *data = ".button {padding: 0;}";
|
|
||||||
|
|
||||||
searchbar->priv = XED_SEARCHBAR_GET_PRIVATE (searchbar);
|
searchbar->priv = XED_SEARCHBAR_GET_PRIVATE (searchbar);
|
||||||
|
|
||||||
|
@ -709,10 +706,7 @@ xed_searchbar_init (XedSearchbar *searchbar)
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (searchbar->priv->search_label), searchbar->priv->search_entry);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (searchbar->priv->search_label), searchbar->priv->search_entry);
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (searchbar->priv->replace_label), searchbar->priv->replace_entry);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (searchbar->priv->replace_label), searchbar->priv->replace_entry);
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
gtk_style_context_add_class (gtk_widget_get_style_context (searchbar->priv->close_button), "close-button");
|
||||||
context = gtk_widget_get_style_context (searchbar->priv->close_button);
|
|
||||||
gtk_css_provider_load_from_data (provider, data, -1, NULL);
|
|
||||||
gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
|
|
||||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||||
gtk_size_group_add_widget (size_group, GTK_WIDGET (searchbar->priv->find_button));
|
gtk_size_group_add_widget (size_group, GTK_WIDGET (searchbar->priv->find_button));
|
||||||
|
|
Loading…
Reference in New Issue