Commit 2ab9756a authored by Jakub Steiner's avatar Jakub Steiner

HC: sync linked button fixes with Adwaita

https://bugzilla.gnome.org/show_bug.cgi?id=733979
parent 2734bf72
......@@ -270,22 +270,22 @@ GtkLabel {
padding: 6px;
border-width: 1px 1px 2px 1px;
@include button(osd);
@extend %linked_buttons;
@extend %linked;
&:hover {
@include button(osd-hover);
@extend %linked_buttons;
@extend %linked;
}
&:active, &:checked {
@include button(osd-active);
@extend %linked_buttons;
@extend %linked;
}
&:insensitive {
@include button(osd-insensitive);
@extend %linked_buttons;
@extend %linked;
}
&:backdrop {
@include button(osd-backdrop);
@extend %linked_buttons;
@extend %linked;
}
}
// Suggested and Destructive Action buttons
......@@ -319,7 +319,7 @@ GtkLabel {
.inline-toolbar &, .inline-toolbar &:backdrop {
border-radius: 2px;
border-width: 1px;
@extend %linked_buttons;
@extend %linked;
}
.primary-toolbar & { icon-shadow: none; } // tango icons don't need added shadows
......@@ -328,7 +328,7 @@ GtkLabel {
// -GtkWidget-horizontal-separator: 0;
// }
.linked &, .linked &:backdrop {
@extend %linked_buttons;
@extend %linked;
}
}
......@@ -371,13 +371,19 @@ GtkLabel {
}
}
%linked_buttons {
%linked_middle {
border-radius: 0;
border-left-style: none;
&:dir(rtl) {
border-radius: 0; // needed when including %linked_middle:dir(rtl)
border-right-style: none;
border-left-style: solid
};
}
}
%linked {
@extend %linked_middle;
&:first-child {
border-radius: 3px 0 0 3px;
border-left-style: solid;
......@@ -392,6 +398,22 @@ GtkLabel {
}
}
%linked_vertical{
border-left-style: solid;
border-top-style: none;
&:first-child {
border-style: solid;
border-radius: 3px 3px 0 0;
}
&:last-child {
border-radius: 0 0 3px 3px;
}
&:only-child {
border-radius: 3px;
border-style: solid;
}
}
%undecorated_button {
border-color: transparent;
background-color: transparent;
......@@ -608,6 +630,23 @@ GtkComboBox {
}
}
.linked > GtkComboBox > .button {
// the combo is a composite widget so the way we do button linkind doesn't
// work, special case needed. See
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
&:dir(ltr) { @extend %linked_middle; } // specificity bump
&:dir(rtl) { @extend %linked_middle:dir(rtl); }
}
.linked > GtkComboBox:first-child > .button {
@extend %linked:first-child;
}
.linked > GtkComboBox:last-child > .button {
@extend %linked:last-child;
}
.linked > GtkComboBox:only-child > .button {
@extend %linked:only-child;
}
/************
* Toolbars *
************/
......
......@@ -488,22 +488,24 @@
border-radius: 3px;
border-style: solid; }
.osd .button, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:insensitive, .osd .button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked .button:backdrop {
.osd .button, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:insensitive, .osd .button:backdrop, .inline-toolbar .button, .inline-toolbar .button:backdrop, .linked .button, .linked .button:backdrop, .linked > GtkComboBox > .button:dir(ltr) {
border-radius: 0;
border-left-style: none; }
.osd .button:dir(rtl), .inline-toolbar .button:dir(rtl), .linked .button:dir(rtl) {
.osd .button:dir(rtl), .inline-toolbar .button:dir(rtl), .linked .button:dir(rtl), .linked > GtkComboBox > .button:dir(rtl) {
border-radius: 0;
border-right-style: none;
border-left-style: solid; }
.osd .button:first-child, .inline-toolbar .button:first-child, .linked .button:first-child {
border-radius: 3px 0 0 3px;
border-left-style: solid; }
.osd .button:last-child, .inline-toolbar .button:last-child, .linked .button:last-child {
border-radius: 0 3px 3px 0; }
.osd .button:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked .button:last-child:dir(rtl) {
border-right-style: solid; }
.osd .button:only-child, .inline-toolbar .button:only-child, .linked .button:only-child {
border-radius: 3px;
border-style: solid; }
.osd .button:first-child, .inline-toolbar .button:first-child, .linked .button:first-child, .linked > GtkComboBox:first-child > .button {
border-radius: 3px 0 0 3px;
border-left-style: solid; }
.osd .button:last-child, .inline-toolbar .button:last-child, .linked .button:last-child, .linked > GtkComboBox:last-child > .button {
border-radius: 0 3px 3px 0; }
.osd .button:last-child:dir(rtl), .inline-toolbar .button:last-child:dir(rtl), .linked .button:last-child:dir(rtl), .linked > GtkComboBox:last-child > .button:dir(rtl) {
border-right-style: solid; }
.osd .button:only-child, .inline-toolbar .button:only-child, .linked .button:only-child, .linked > GtkComboBox:only-child > .button {
border-radius: 3px;
border-style: solid; }
.button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, .list-row.button, .list-row.button:backdrop:hover, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover {
border-color: transparent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment