Adwaita: add vertically linked combos

This commit is contained in:
Lapo Calamandrei 2014-10-05 00:56:48 +02:00
parent cfdbd59963
commit f2cd7f151e
3 changed files with 48 additions and 23 deletions

View File

@ -328,7 +328,7 @@ GtkTextView { // This will get overridden by .view, needed by gedit line numbers
&:backdrop { color: mix($backdrop_fg_color,$backdrop_base_color,80%); } &:backdrop { color: mix($backdrop_fg_color,$backdrop_base_color,80%); }
} }
.linked.vertical & { .linked.vertical & { //FIXME comment stuff and make the whole thing smarter.
@include entry(normal, $edge: none); @include entry(normal, $edge: none);
background-image: linear-gradient(to bottom, $base_color); background-image: linear-gradient(to bottom, $base_color);
border-bottom-color: mix($borders_color, $base_color, 30%); border-bottom-color: mix($borders_color, $base_color, 30%);
@ -754,9 +754,14 @@ $_dot_color: if($variant=='light', $selected_bg_color,
} }
} }
%linked_vertical{ %linked_vertical_middle {
border-left-style: solid; border-left-style: solid;
border-top-style: none; border-top-style: none;
border-radius: 0;
}
%linked_vertical{
@extend %linked_vertical_middle;
&:first-child { &:first-child {
border-style: solid; border-style: solid;
border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0;
@ -879,7 +884,7 @@ GtkColorButton.button {
&:dir(rtl) { border-style: none solid none none; } &:dir(rtl) { border-style: none solid none none; }
} }
} }
&.vertical, &.vertical:dir(rtl) { &.vertical, &.vertical:dir(rtl) { //FIXME: try using linking templates for vertically linked stuff
.button { .button {
padding-top: 8px; // Same vertical padding as image-buttons padding-top: 8px; // Same vertical padding as image-buttons
padding-bottom: 8px; // padding-bottom: 8px; //
@ -1013,6 +1018,14 @@ GtkComboBox {
.linked > GtkComboBox:only-child > .button { .linked > GtkComboBox:only-child > .button {
@extend %linked:only-child; @extend %linked:only-child;
} }
.linked.vertical > GtkComboBoxText > .button,
.linked.vertical > GtkComboBox > .button { @extend %linked_vertical_middle; }
.linked.vertical > GtkComboBoxText:first-child > .button,
.linked.vertical > GtkComboBox:first-child > .button { @extend %linked_vertical:first-child; }
.linked.vertical > GtkComboBoxText:last-child > .button,
.linked.vertical > GtkComboBox:last-child > .button { @extend %linked_vertical:last-child; }
.linked.vertical > GtkComboBoxText:only-child > .button,
.linked.vertical > GtkComboBox:only-child > .button { @extend %linked_vertical:only-child; }
/************ /************
* Toolbars * * Toolbars *

View File

@ -1192,15 +1192,21 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }
.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop { .linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
.linked.vertical > GtkComboBox > .button {
border-left-style: solid; border-left-style: solid;
border-top-style: none; } border-top-style: none;
.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child { border-radius: 0; }
.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
.linked.vertical > GtkComboBox:first-child > .button {
border-style: solid; border-style: solid;
border-radius: 3px 3px 0 0; } border-radius: 3px 3px 0 0; }
.linked.vertical .entry:last-child, .linked.vertical .button:last-child { .linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
.linked.vertical > GtkComboBox:last-child > .button {
border-radius: 0 0 3px 3px; } border-radius: 0 0 3px 3px; }
.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child { .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
.linked.vertical > GtkComboBox:only-child > .button {
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }

View File

@ -1184,15 +1184,21 @@ GtkCalendar.header .inline-toolbar GtkToolButton:backdrop:only-child > .button.t
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }
.linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop { .linked.vertical .entry, .linked.vertical .entry:focus, .linked.vertical .entry:insensitive, .linked.vertical .entry:insensitive:backdrop, .linked.vertical .entry:backdrop, .linked.vertical .entry:last-child:focus, .linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:checked, .linked.vertical .button:backdrop, .linked.vertical > GtkComboBoxText > .button,
.linked.vertical > GtkComboBox > .button {
border-left-style: solid; border-left-style: solid;
border-top-style: none; } border-top-style: none;
.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child { border-radius: 0; }
.linked.vertical .entry:first-child, .linked.vertical .entry:first-child:last-child:focus, .linked.vertical .button:first-child, .linked.vertical > GtkComboBoxText:first-child > .button,
.linked.vertical > GtkComboBox:first-child > .button {
border-style: solid; border-style: solid;
border-radius: 3px 3px 0 0; } border-radius: 3px 3px 0 0; }
.linked.vertical .entry:last-child, .linked.vertical .button:last-child { .linked.vertical .entry:last-child, .linked.vertical .button:last-child, .linked.vertical > GtkComboBoxText:last-child > .button,
.linked.vertical > GtkComboBox:last-child > .button {
border-radius: 0 0 3px 3px; } border-radius: 0 0 3px 3px; }
.linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child { .linked.vertical .entry:only-child, .linked.vertical .entry:only-child:last-child:focus, .linked.vertical .button:only-child, .linked.vertical > GtkComboBoxText:only-child > .button,
.linked.vertical > GtkComboBox:only-child > .button {
border-radius: 3px; border-radius: 3px;
border-style: solid; } border-style: solid; }