From 9b42edbef45b269f11effada3e0cb82e34acafc1 Mon Sep 17 00:00:00 2001 From: nana-4 Date: Sat, 15 Aug 2020 22:44:03 +0900 Subject: [PATCH 1/2] tooltip: Replace hard-coded margins with theme So we can easily adjust the widget sizing in the theme. --- gtk/theme/Adwaita/_common.scss | 6 +++++- gtk/ui/gtktooltipwindow.ui | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 429bd371f0..bddf62f632 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3604,10 +3604,14 @@ tooltip { color: white; } - padding: 4px; + padding: 10px; border-radius: 5px; box-shadow: none; // otherwise it gets inherited by windowframe.csd text-shadow: 0 1px black; + + > box { + border-spacing: 6px; + } } diff --git a/gtk/ui/gtktooltipwindow.ui b/gtk/ui/gtktooltipwindow.ui index fd2e7b7fd3..127fa045e4 100644 --- a/gtk/ui/gtktooltipwindow.ui +++ b/gtk/ui/gtktooltipwindow.ui @@ -6,11 +6,6 @@ - 6 - 6 - 6 - 6 - 6 image-missing From 19c2cc1296cd22a4ebeff2cb8aa9d29179bd7bb5 Mon Sep 17 00:00:00 2001 From: nana-4 Date: Sat, 15 Aug 2020 22:45:39 +0900 Subject: [PATCH 2/2] placessidebar: Replace hard-coded margins with theme So we can easily adjust the widget sizing in the theme. --- gtk/gtkplacessidebar.c | 3 --- gtk/theme/Adwaita/_common.scss | 12 ++++++++++++ gtk/ui/gtksidebarrow.ui | 2 -- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index dbe9e81116..d7ac99a788 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -394,14 +394,11 @@ list_box_header_func (GtkListBoxRow *row, else { before_section_type = SECTION_INVALID; - gtk_widget_set_margin_top (GTK_WIDGET (row), 4); } if (before && before_section_type != row_section_type) { separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); - gtk_widget_set_margin_top (separator, 4); - gtk_widget_set_margin_bottom (separator, 4); gtk_list_box_row_set_header (row, separator); } } diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index bddf62f632..57446f56e6 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -3389,6 +3389,18 @@ row image.sidebar-icon { opacity: $_placesidebar_icons_opacity; } // dim the sid placessidebar, .navigation-sidebar { > scrolledwindow.frame { border-style: none; } + list { + padding: 4px 0; + + > row { + margin: 1px 0; + } + + > separator { + margin: 4px 0; + } + } + row { // Needs overriding of the GtkListBoxRow padding min-height: 36px; diff --git a/gtk/ui/gtksidebarrow.ui b/gtk/ui/gtksidebarrow.ui index 38ecbf3be8..787a478276 100644 --- a/gtk/ui/gtksidebarrow.ui +++ b/gtk/ui/gtksidebarrow.ui @@ -1,8 +1,6 @@