Skip to content

Commit

Permalink
Merge pull request #32 from smurphos/cinnamox
Browse files Browse the repository at this point in the history
Cinnamon - add gradient to dialog entrys
  • Loading branch information
smurphos authored Mar 21, 2018
2 parents 3e6a4ed + ecc44c5 commit c7725b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cinnamon/scss/_extends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
background-gradient-end: $light_bg_grad;
}

// dark to bottom
%dark-bg-grad-to-bottom {
background-gradient-direction: vertical;
background-gradient-start: $dark_entry_bg_grad;
background-gradient-end: $light_entry_bg_grad;
}

// button to top
%button-bg-grad-to-top {
background-gradient-direction: vertical;
Expand Down Expand Up @@ -116,12 +123,11 @@
// used in selectors
// #menu-search-entry, .run-dialog-entry, #notification StEntry
%dialog-entry {
background-color: $dark_bg_color;
@extend %dark-bg-grad-to-bottom;
padding: 2px;
border-radius: $roundness;
color: $dark_fg_color;
font-weight: bold;
border: 1px solid $selected_border;
border: 1px solid $interior_border;
selection-background-color: $selected_bg_color;
selected-color: $selected_fg_color;
caret-color: $primary_caret_color;
Expand Down
4 changes: 4 additions & 0 deletions src/cinnamon/scss/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ $dark_hover_button_bg_grad: if($darken_amount < 1, darken($hover_button_bg, (1 -
$light_tooltip_bg_grad: if($lighten_amount > 1, lighten($tooltip_bg_color, ($lighten_amount - 1) * lightness($tooltip_bg_color)), $tooltip_bg_color);
$dark_tooltip_bg_grad: if($darken_amount < 1, darken($tooltip_bg_color, (1 - $darken_amount) * lightness($tooltip_bg_color)), $tooltip_bg_color);

// entry background surface gradient start and end colors - used for menu search entry, run dialog etc
$light_entry_bg_grad: if($lighten_amount > 1, lighten($dark_bg_color, ($lighten_amount - 1) * lightness($dark_bg_color)), $dark_bg_color);
$dark_entry_bg_grad: if($darken_amount < 1, darken($dark_bg_color, (1 - $darken_amount) * lightness($dark_bg_color)), $dark_bg_color);

// borders used throughout theme buttons also use selected_borders_color
$selected_border: mix($mid_bg_color, $selected_bg_color, if(lightness($mid_bg_color) < 50%, 18%, 10%));
$border_strength: if(lightness($mid_fg_color) > 50, .1, .2);
Expand Down
3 changes: 3 additions & 0 deletions src/cinnamon/scss/sections/_dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
}
.run-dialog-entry {
@extend %dialog-entry;
&:focus {
border: 1px solid $selected_border;
}
}
.run-dialog {
border-radius: $roundness;
Expand Down

0 comments on commit c7725b2

Please sign in to comment.