From: Matthias Clasen Date: Thu, 23 Jan 2020 04:53:55 +0000 (-0500) Subject: pathbar: Use a css name insead of a style class X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~216 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c3f1ff7db48f56ebfa79d8e27c424cbd48d8c51c;p=gtk4.git pathbar: Use a css name insead of a style class Use pathbar for GtkPathBar in css, instead of the previous .path-bar. Update Adwaita to match. --- diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index 37a7b05487..d5d89a12b9 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -240,7 +240,6 @@ gtk_path_bar_init (GtkPathBar *path_bar) G_CALLBACK (gtk_path_bar_scroll_down), path_bar); context = gtk_widget_get_style_context (GTK_WIDGET (path_bar)); - gtk_style_context_add_class (context, "path-bar"); gtk_style_context_add_class (context, GTK_STYLE_CLASS_LINKED); priv->get_info_cancellable = NULL; @@ -304,6 +303,8 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class) gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_slider_down_defocus); gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_up); gtk_widget_class_bind_template_callback (widget_class, gtk_path_bar_scroll_down); + + gtk_widget_class_set_css_name (widget_class, "pathbar"); } diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index 50184af64b..380d55a573 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1867,7 +1867,7 @@ window.devel { * Pathbars * ************/ -.path-bar button { +pathbar button { &.text-button, &.image-button, & { padding-left: 4px; padding-right: 4px; diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index e7073ae70f..c1bec28e6e 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -101,15 +101,23 @@ spinner:checked { opacity: 1; animation: spin 1s linear infinite; } spinner:checked:disabled { opacity: 0.5; } /********************** General Typography * */ -.type-large-title { font-weight: 300; font-size: 24pt; letter-spacing: 0.2rem; } +.large-title { font-weight: 300; font-size: 24pt; letter-spacing: 0.2rem; } -.type-title { font-weight: 600; font-size: 16pt; } +.title-1 { font-weight: 800; font-size: 20pt; } -.type-heading { font-weight: 500; font-size: 11pt; } +.title-2 { font-weight: 800; font-size: 15pt; } -.type-body { font-weight: 400; font-size: 11pt; } +.title-3 { font-weight: 700; font-size: 15pt; } -.type-caption { font-weight: 400; font-size: 9pt; } +.title-4 { font-weight: 700; font-size: 13pt; } + +.heading { font-weight: 700; font-size: 11pt; } + +.body { font-weight: 400; font-size: 11pt; } + +.caption-heading { font-weight: 700; font-size: 9pt; } + +.caption { font-weight: 400; font-size: 9pt; } /**************** Text Entries * */ spinbutton:not(.vertical), spinbutton.vertical text, entry { min-height: 32px; padding-left: 8px; padding-right: 8px; border: 1px solid; border-radius: 5px; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); color: white; border-color: #1b1b1b; background-color: #2d2d2d; box-shadow: inset 0 0 0 1px rgba(21, 83, 158, 0); } @@ -673,17 +681,17 @@ window.devel headerbar.titlebar:not(.selection-mode) { background: #353535 cross window.devel headerbar.titlebar:not(.selection-mode):backdrop { background: #353535 cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, image(#353535); /* background-color would flash */ } /************ Pathbars * */ -.path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; } +pathbar button.text-button, pathbar button.image-button, pathbar button { padding-left: 4px; padding-right: 4px; } -.path-bar button.text-button.image-button label { padding-left: 0; padding-right: 0; } +pathbar button.text-button.image-button label { padding-left: 0; padding-right: 0; } -.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child { padding-right: 8px; } +pathbar button.text-button.image-button label:last-child, pathbar button label:last-child { padding-right: 8px; } -.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child { padding-left: 8px; } +pathbar button.text-button.image-button label:first-child, pathbar button label:first-child { padding-left: 8px; } -.path-bar button image { padding-left: 4px; padding-right: 4px; } +pathbar button image { padding-left: 4px; padding-right: 4px; } -.path-bar button.slider-button { padding-left: 0; padding-right: 0; } +pathbar button.slider-button { padding-left: 0; padding-right: 0; } /************** Tree Views * */ treeview.view { border-left-color: #8e8e8d; border-top-color: #353535; } diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 6503de6612..42e8c4af35 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -101,15 +101,23 @@ spinner:checked { opacity: 1; animation: spin 1s linear infinite; } spinner:checked:disabled { opacity: 0.5; } /********************** General Typography * */ -.type-large-title { font-weight: 300; font-size: 24pt; letter-spacing: 0.2rem; } +.large-title { font-weight: 300; font-size: 24pt; letter-spacing: 0.2rem; } -.type-title { font-weight: 600; font-size: 16pt; } +.title-1 { font-weight: 800; font-size: 20pt; } -.type-heading { font-weight: 500; font-size: 11pt; } +.title-2 { font-weight: 800; font-size: 15pt; } -.type-body { font-weight: 400; font-size: 11pt; } +.title-3 { font-weight: 700; font-size: 15pt; } -.type-caption { font-weight: 400; font-size: 9pt; } +.title-4 { font-weight: 700; font-size: 13pt; } + +.heading { font-weight: 700; font-size: 11pt; } + +.body { font-weight: 400; font-size: 11pt; } + +.caption-heading { font-weight: 700; font-size: 9pt; } + +.caption { font-weight: 400; font-size: 9pt; } /**************** Text Entries * */ spinbutton:not(.vertical), spinbutton.vertical text, entry { min-height: 32px; padding-left: 8px; padding-right: 8px; border: 1px solid; border-radius: 5px; transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94); color: black; border-color: #cdc7c2; background-color: #ffffff; box-shadow: inset 0 0 0 1px rgba(53, 132, 228, 0); } @@ -681,17 +689,17 @@ window.devel headerbar.titlebar:not(.selection-mode) { background: #f6f5f4 cross window.devel headerbar.titlebar:not(.selection-mode):backdrop { background: #f6f5f4 cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat, image(#f6f5f4); /* background-color would flash */ } /************ Pathbars * */ -.path-bar button.text-button, .path-bar button.image-button, .path-bar button { padding-left: 4px; padding-right: 4px; } +pathbar button.text-button, pathbar button.image-button, pathbar button { padding-left: 4px; padding-right: 4px; } -.path-bar button.text-button.image-button label { padding-left: 0; padding-right: 0; } +pathbar button.text-button.image-button label { padding-left: 0; padding-right: 0; } -.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child { padding-right: 8px; } +pathbar button.text-button.image-button label:last-child, pathbar button label:last-child { padding-right: 8px; } -.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child { padding-left: 8px; } +pathbar button.text-button.image-button label:first-child, pathbar button label:first-child { padding-left: 8px; } -.path-bar button image { padding-left: 4px; padding-right: 4px; } +pathbar button image { padding-left: 4px; padding-right: 4px; } -.path-bar button.slider-button { padding-left: 0; padding-right: 0; } +pathbar button.slider-button { padding-left: 0; padding-right: 0; } /************** Tree Views * */ treeview.view { border-left-color: #979a9b; border-top-color: #f6f5f4; }