Commit 871959c8 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Adwaita: Drop selection mode

This is not really a feature that GTK has; and it lets
us drop a significant amount of css.
parent 55d08d84
Pipeline #146034 passed with stages
in 21 minutes and 22 seconds
......@@ -1496,133 +1496,6 @@ headerbar {
}
}
.selection-mode &,
&.selection-mode {
$_hc: mix($top_hilight,$selected_bg_color, 50%); // hilight color
color: $selected_fg_color;
border-color: $selected_borders_color;
text-shadow: 0 -1px transparentize(black, 0.5);
@include headerbar_fill($selected_bg_color, $_hc);
&:backdrop {
background-color: $selected_bg_color;
background-image: none;
box-shadow: inset 0 1px mix($top_hilight, $selected_bg_color, 60%);
label {
text-shadow: none;
color: $selected_fg_color;
}
}
.subtitle:link { @extend %link_selected; }
button {
@include button(normal, $selected_bg_color, $selected_fg_color);
@at-root %selection_mode_button_flat,
&.flat { @include button(undecorated); }
&:hover { @include button(hover, $selected_bg_color, $selected_fg_color); }
&:active,
&:checked { @include button(active, $selected_bg_color, $selected_fg_color); }
&:backdrop {
&.flat, & {
@include button(backdrop, $selected_bg_color, $selected_fg_color);
-gtk-icon-filter: none;
border-color: $selected_borders_color;
&:active,
&:checked {
@include button(backdrop-active, $selected_bg_color, $selected_fg_color);
border-color: $selected_borders_color;
}
&:disabled {
@include button(backdrop-insensitive, $selected_bg_color, $selected_fg_color);
border-color: $selected_borders_color;
&:active, &:checked {
@include button(backdrop-insensitive-active, $selected_bg_color, $selected_fg_color);
border-color: $selected_borders_color;
}
}
}
}
@at-root %selection_mode_button_flat,
&.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
&:disabled {
@include button(insensitive, $selected_bg_color, $selected_fg_color);
&:active,
&:checked { @include button(insensitive-active, $selected_bg_color, $selected_fg_color); }
}
&.suggested-action {
@include button(normal);
border-color: $selected_borders_color;
&:hover {
@include button(hover);
border-color: $selected_borders_color;
}
&:active {
@include button(active);
border-color: $selected_borders_color;
}
&:disabled {
@include button(insensitive);
border-color: $selected_borders_color;
}
&:backdrop {
@include button(backdrop);
border-color: $selected_borders_color;
}
&:backdrop:disabled {
@include button(backdrop-insensitive);
border-color: $selected_borders_color;
}
}
}
.selection-menu {
&:backdrop, & {
border-color: transparentize($selected_bg_color, 1);
background-color: transparentize($selected_bg_color, 1);
background-image: none;
box-shadow: none;
padding-left: 10px;
padding-right: 10px;
.arrow {
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
color: transparentize($selected_fg_color,0.5);
-gtk-icon-shadow: none;
}
}
}
}
// squared corners when the window is maximized, tiled, or fullscreen
.tiled &,
.tiled-top &,
......@@ -1750,7 +1623,7 @@ headerbar { // headerbar border rounding
// Development versions of apps to use a differently styled headerbar
window.devel {
headerbar.titlebar:not(.selection-mode) {
headerbar.titlebar {
$c: darken($bg_color, 10%);
$gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.8)),
......@@ -3747,11 +3620,6 @@ separator.sidebar {
&:backdrop {
background-color: $backdrop_borders_color;
}
&.selection-mode,
.selection-mode & {
background-color: darken($selected_bg_color, 20%);
}
}
......@@ -4302,25 +4170,9 @@ button.titlebutton {
min-height: 0;
}
.selection-mode & {
@extend %selection_mode_button_flat;
@extend %nobg_selected_items;
}
&:backdrop { -gtk-icon-shadow: none; }
}
.selection-mode headerbar button.titlebutton,
.selection-mode .titlebar button.titlebutton,
headerbar.selection-mode button.titlebutton,
.titlebar.selection-mode button.titlebutton {
@include _button_text_shadow(white, $selected_bg_color);
&:backdrop { -gtk-icon-shadow: none; }
}
// catch all extend :)
%selected_items {
......
This diff is collapsed.
This diff is collapsed.
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