Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Gnome-shell-3.24&3.26: [Keyboard] Update spacing factors
Browse files Browse the repository at this point in the history
* Stop using variant specific spacing values
* Basically the size of OSK region should be purely computed
  from the combo 'screen resolution' and 'window-scaling-factor',
  so let's purge font-sensitive scaling parts.
* Optimize key-gaps more for x2 scaling on FHD+ or higher resolution
  displays.
  • Loading branch information
tista500 committed Aug 19, 2018
1 parent 640f15c commit 06246f6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
17 changes: 9 additions & 8 deletions shell/sass/gnome-shell/3.24/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2579,24 +2579,25 @@ $legacy_icon_size: if($eta == false, 24px, 16px);
#keyboard { background-color: shellopacity($panel_bg_color, 0.54); }

.keyboard {
&-layout {
spacing: if($eta == false, 12px, 8px);
padding: if($eta == false, 12px, 8px);
&-layout { // no need to set variant specific spacing
spacing: $ref_size * 0.3;
padding: $ref_size * 0.3;
}

&-row { spacing: if($eta == false, 12px, 8px); }
&-row { spacing: $ref_size * 0.3; }

&-key {
@include fontscaling($ref_size * 2.0);
min-height: 2em;
min-width: 2em;
min-height: $ref_size * 2;
min-width: $ref_size * 2;
padding: 0;
border-radius: 2px;
border: none;
background-color: $osd_bg_color;
color: $osd_secondary_fg_color;
box-shadow: $empty_shadow;
text-shadow: none;
icon-shadow: none;
font-size: $ref_size * 2; // use unscalable unit
font-weight: 700;
transition-timing-function: $slope_slow;
&:focus,
Expand Down Expand Up @@ -2627,7 +2628,7 @@ $legacy_icon_size: if($eta == false, 24px, 16px);
-arrow-border-color: transparent;
-arrow-base: 0;
-arrow-rise: 0;
-boxpointer-gap: if($eta == false, 12px, 8px);
-boxpointer-gap: $ref_size * 0.3;
background-color: $suggested_color;
color: $selected_fg_color;
box-shadow: $z-depth-2;
Expand Down
29 changes: 15 additions & 14 deletions shell/sass/gnome-shell/3.26/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2741,31 +2741,32 @@ $provider_details_width: 120px;
// On-screen Keyboard
#keyboard { background-color: $panel_tertiary_fill_color; }

.key-container { // NEEDS_REVIEW: upcoming
padding: 4px;
spacing: 4px;
.key-container { // current
// no need to set variant specific spacing
padding: $ref_size * 0.3;
spacing: $ref_size * 0.3;
}

.keyboard {
// -layout and -row will become legacy
&-layout {
spacing: if($eta == false, 12px, 8px);
padding: if($eta == false, 12px, 8px);
&-layout { // legacy
spacing: $ref_size * 0.3;
padding: $ref_size * 0.3;
}

&-row { spacing: if($eta == false, 12px, 8px); }
&-row { spacing: $ref_size * 0.3; } // legacy

&-key {
min-height: 2em;
min-width: 2em;
min-height: $ref_size * 2;
min-width: $ref_size * 2;
padding: 0;
border-radius: 2px;
border: none;
background-color: $osd_bg_color;
color: $osd_secondary_fg_color;
box-shadow: $empty_shadow;
text-shadow: none;
icon-shadow: none;
font-size: 13px * 2; // use unscalable unit
font-size: $ref_size * 2; // use unscalable unit
font-weight: 700;
transition-timing-function: $slope_medium;
&:focus,
Expand All @@ -2788,7 +2789,7 @@ $provider_details_width: 120px;

&.default-key {
background-color: mix($osd_bg_color, $panel_bg_color, 75%);
background-size: 13px * 2;
background-size: $ref_size * 2;
color: $osd_secondary_fg_color;
&:focus,
&:hover,
Expand Down Expand Up @@ -2894,7 +2895,7 @@ $provider_details_width: 120px;
-arrow-border-color: transparent;
-arrow-base: 0;
-arrow-rise: 0;
-boxpointer-gap: if($eta == false, 12px, 8px);
-boxpointer-gap: $ref_size * 0.3;
background-color: $suggested_color;
color: $selected_fg_color;
box-shadow: $z-depth-2;
Expand All @@ -2905,7 +2906,7 @@ $provider_details_width: 120px;
.word-suggestions { // NEEDS_REVIEW: upcoming
@include fontscaling($ref_size * 1.3);
min-height: 1.6em;
spacing: if($eta == false, 12px, 8px);
spacing: $ref_size * 0.3;
font-weight: 500;
}

Expand Down

0 comments on commit 06246f6

Please sign in to comment.