Merge branch 'remove-unnecessary-frames' into 'master'

Remove unnecessary frames from some widgets

See merge request GNOME/gtk!2462
This commit is contained in:
Matthias Clasen 2020-08-22 14:09:35 +00:00
commit 4eacfdba60
4 changed files with 1 additions and 14 deletions

View File

@ -67,7 +67,6 @@
#include "gtkintl.h"
#include "gtkcellrenderertext.h"
#include "gtkframe.h"
#include "gtktreeselection.h"
#include "gtktreeview.h"
#include "gtkscrolledwindow.h"
@ -464,7 +463,6 @@ gtk_entry_completion_constructed (GObject *object)
{
GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (object);
GtkTreeSelection *sel;
GtkWidget *popup_frame;
GtkEventController *controller;
G_OBJECT_CLASS (gtk_entry_completion_parent_class)->constructed (object);
@ -526,14 +524,11 @@ gtk_entry_completion_constructed (GObject *object)
completion);
gtk_widget_add_controller (completion->popup_window, controller);
popup_frame = gtk_frame_new (NULL);
gtk_popover_set_child (GTK_POPOVER (completion->popup_window), popup_frame);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (completion->scrolled_window),
completion->tree_view);
gtk_widget_set_hexpand (completion->scrolled_window, TRUE);
gtk_widget_set_vexpand (completion->scrolled_window, TRUE);
gtk_frame_set_child (GTK_FRAME (popup_frame), completion->scrolled_window);
gtk_popover_set_child (GTK_POPOVER (completion->popup_window), completion->scrolled_window);
}

View File

@ -3774,7 +3774,6 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sidebar->swin),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (sidebar->swin), TRUE);
gtk_widget_add_css_class (GTK_WIDGET (sidebar), "sidebar");

View File

@ -475,7 +475,6 @@ gtk_viewport_init (GtkViewport *viewport)
viewport->hadjustment = NULL;
viewport->vadjustment = NULL;
gtk_widget_add_css_class (widget, "frame");
viewport_set_adjustment (viewport, GTK_ORIENTATION_HORIZONTAL, NULL);
viewport_set_adjustment (viewport, GTK_ORIENTATION_VERTICAL, NULL);
}

View File

@ -3020,10 +3020,6 @@ actionbar > revealer > box {
}
scrolledwindow {
> viewport.frame { // avoid double borders when viewport inside scrolled window
border-style: none;
}
// This is used when content is touch-dragged past boundaries.
// draws a box on top of the content, the size changes programmatically.
> overshoot {
@ -3407,8 +3403,6 @@ row image.sidebar-icon { opacity: $_placesidebar_icons_opacity; } // dim the sid
https://gitlab.gnome.org/GNOME/gtk/-/issues/2929
*/
placessidebar, .navigation-sidebar {
> scrolledwindow.frame { border-style: none; }
list {
padding: 4px 0;