pathbar: Use a css name insead of a style class
authorMatthias Clasen <mclasen@redhat.com>
Thu, 23 Jan 2020 04:53:55 +0000 (23:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 23 Jan 2020 04:56:22 +0000 (23:56 -0500)
Use pathbar for GtkPathBar in css, instead of the
previous .path-bar. Update Adwaita to match.

gtk/gtkpathbar.c
gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 37a7b05487216364129483e83f509671a5bf84ef..d5d89a12b9315cab94c177807d439a7ee9887109 100644 (file)
@@ -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");
 }
 
 
index 50184af64be8b60a620cef0cbee6995cb8e8d507..380d55a573fd833debe0dc77e74b7460278d95f6 100644 (file)
@@ -1867,7 +1867,7 @@ window.devel {
  * Pathbars *
  ************/
 
-.path-bar button {
+pathbar button {
   &.text-button, &.image-button, & {
     padding-left: 4px;
     padding-right: 4px;
index e7073ae70f6b2b834fbc20a40a836ca01aed9231..c1bec28e6e7ef33e447cfd422035189c641f591a 100644 (file)
@@ -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; }
index 6503de66123a1418ff34aac140936c89e3a712ba..42e8c4af35fc51740d8d40d203556a2fd280e079 100644 (file)
@@ -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; }