Skip to content

Commit 0bc065e

Browse files
hsbasugithub-actions[bot]
authored andcommitted
New upstream snapshot for GTK4
1 parent 5349ce7 commit 0bc065e

193 files changed

Lines changed: 4493 additions & 875 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gtk/upstream/gtk-4.0/Yaru/_colors-public.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ these are pretty self explicative */
8282
@define-color warning_color #{"" +$warning_color};
8383
@define-color error_color #{"" +$error_color};
8484
@define-color success_color #{"" +$success_color};
85+
@define-color accent_color #{"" +$accent_color};
8586
//@define-color destructive_color #{$destructive_color}
8687

8788
//WM

gtk/upstream/gtk-4.0/Yaru/_colors.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
@import 'palette';
55

6+
$light_bg_color: #FAFAFA;
7+
$dark_bg_color: lighten($jet, 8%);
8+
69
$base_color: if($variant == 'light', #ffffff, lighten($jet, 6%));
710
$text_color: if($variant == 'light', black, white);
8-
$bg_color: if($variant == 'light', #FAFAFA, lighten($jet, 8%));
11+
$bg_color: if($variant == 'light', $light_bg_color, $dark_bg_color);
912
$fg_color: if($variant == 'light', $inkstone, $porcelain);
1013

1114
$selected_fg_color: $accent_fg_color;
@@ -83,3 +86,6 @@ $contrast_target: if($variant=='light', 6, 5.5);
8386
$link_color: optimize-contrast($bg_color, $accent_bg_color, $target: $contrast_target);
8487
$link_visited_color: if($variant=='light', darken($link_color, 10%),
8588
optimize-contrast($bg_color, $accent_bg_color));
89+
90+
// Yaru: Used by upstream scss code.
91+
$accent_color: $accent_bg_color;

gtk/upstream/gtk-4.0/Yaru/_common.scss

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
66
$asset_suffix: if($variant=='dark', '-dark', '');
7-
$assets: if($contrast=='normal', 'assets', 'assets-hc');
7+
$asset_prefix: if($contrast=='normal', '', 'hc-');
8+
$assets: 'assets';
89
$backdrop_transition: 200ms ease-out;
910
$button_transition: all 200ms $ease-out-quad;
1011
$focus_transition: outline-width 200ms $ease-out-quad, outline-offset 200ms $ease-out-quad;
1112
$button_radius: 6px; // Yaru change: sync radius with Gtk4
12-
$menu_radius: 6px; // Yaru change: ↑↑↑
13-
$window_radius: $button_radius + 6; // Yaru change: ↑↑↑
13+
$menu_radius: 8px; // Yaru change: ↑↑↑
14+
$window_radius: 15px; // Yaru change: ↑↑↑
1415
$popover_radius: $window_radius; // Yaru change: ↑↑↑
1516
$menu_margin: $menu_radius; //margin around menuitems & sidebar items
1617

@@ -86,6 +87,35 @@ textview {
8687
}
8788
}
8889

90+
preedit {
91+
&.whole {
92+
text-decoration: underline;
93+
}
94+
95+
&.selection {
96+
background-color: $backdrop_selected_bg_color;
97+
color: transparent;
98+
}
99+
100+
&.prediction {
101+
font-style: italic;
102+
}
103+
104+
&.prefix, &.suffix {
105+
color: gtkalpha(currentColor, 0.5);
106+
}
107+
108+
&.spelling-error {
109+
text-decoration: $error_color underline wavy;
110+
}
111+
112+
&.compose-error {
113+
text-decoration: $error_color line-through;
114+
}
115+
}
116+
117+
textview > text > preedit { @extend preedit; }
118+
89119
textview > border { background-color: mix($bg_color, $base_color, 50%); }
90120

91121
iconview {
@@ -355,6 +385,10 @@ entry {
355385
}
356386
}
357387

388+
> text > preedit {
389+
@extend preedit;
390+
}
391+
358392
// entry error and warning style
359393
@each $e_type, $e_color in (error, $error_color),
360394
(warning, $warning_color) {
@@ -1622,13 +1656,10 @@ headerbar {
16221656
margin: 0;
16231657
}
16241658

1625-
&.start {
1626-
margin-left: -6px;
1627-
1628-
> button:first-child {
1629-
padding-left: 6px;
1630-
}
1659+
&.start > image.icon {
1660+
-gtk-icon-size: 20px;
16311661
}
1662+
16321663
&.end {
16331664
margin-right: -6px;
16341665

@@ -2642,23 +2673,19 @@ check {
26422673
border-radius: 3px;
26432674
-gtk-icon-size: 14px;
26442675

2645-
&:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("#{$assets}/check-symbolic.symbolic.png")),
2646-
-gtk-recolor(url("#{$assets}/check@2-symbolic.symbolic.png"))); }
2676+
&:checked { -gtk-icon-source: -gtk-recolor(url("#{$assets}/#{$asset_prefix}check-symbolic.svg")); }
26472677

2648-
&:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("#{$assets}/dash-symbolic.symbolic.png")),
2649-
-gtk-recolor(url("#{$assets}/dash@2-symbolic.symbolic.png"))); }
2678+
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("#{$assets}/#{$asset_prefix}dash-symbolic.svg")); }
26502679
}
26512680

26522681
%radio,
26532682
radio {
26542683
border-radius: 100%;
26552684
-gtk-icon-size: 14px;
26562685

2657-
&:checked { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("#{$assets}/bullet-symbolic.symbolic.png")),
2658-
-gtk-recolor(url("#{$assets}/bullet@2-symbolic.symbolic.png"))); }
2686+
&:checked { -gtk-icon-source: -gtk-recolor(url("#{$assets}/#{$asset_prefix}bullet-symbolic.svg")); }
26592687

2660-
&:indeterminate { -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("#{$assets}/dash-symbolic.symbolic.png")),
2661-
-gtk-recolor(url("#{$assets}/dash@2-symbolic.symbolic.png"))); }
2688+
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("#{$assets}/#{$asset_prefix}dash-symbolic.svg")); }
26622689
}
26632690

26642691
treeview.view check,
@@ -2911,7 +2938,6 @@ scale {
29112938
// *WARNING* scale with marks madness following
29122939

29132940
// FIXME: OSD and selected list rows missing, I don't feel like adding the other 144 assets needed for those...
2914-
$suffix: if($variant == 'light', '', '-dark');
29152941

29162942
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
29172943
('vertical', 'vert') {
@@ -2928,7 +2954,7 @@ scale {
29282954
// an asymmetric slider asset is used here, so the margins are uneven, the smaller
29292955
// margin is set on the point side.
29302956
margin: -10px;
2931-
$_scale_asset: '#{$assets}/slider-#{$dir_infix}-#{$marks_infix}#{$state_infix}#{$suffix}';
2957+
$_scale_asset: '#{$assets}/#{$asset_prefix}slider-#{$dir_infix}-#{$marks_infix}#{$state_infix}#{$asset_suffix}';
29322958
border-style: none;
29332959
border-radius: 0;
29342960

@@ -4315,19 +4341,19 @@ cursor-handle {
43154341
(':hover','-hover'),
43164342
(':active','-active') { //no need for insensitive and backdrop
43174343
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
4318-
$_url: '#{$assets}/text-select-start#{$as}#{$asset_suffix}';
4344+
$_url: '#{$assets}/#{$asset_prefix}text-select-start#{$as}#{$asset_suffix}';
43194345
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
43204346
url('#{$_url}@2.png'));
43214347
}
43224348

43234349
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
4324-
$_url: '#{$assets}/text-select-end#{$as}#{$asset_suffix}';
4350+
$_url: '#{$assets}/#{$asset_prefix}text-select-end#{$as}#{$asset_suffix}';
43254351
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
43264352
url('#{$_url}@2.png'));
43274353
}
43284354

43294355
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
4330-
$_url: '#{$assets}/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
4356+
$_url: '#{$assets}/#{$asset_prefix}slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
43314357
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
43324358
url('#{$_url}@2.png'));
43334359
}

gtk/upstream/gtk-4.0/Yaru/_tweaks.scss

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,35 @@ spinbutton:not(.vertical) {
7676
// titlebutton
7777
windowcontrols {
7878
button {
79-
min-width: 24px;
80-
}
79+
min-width: 24px;
8180

82-
button > image {
8381
$_base_button_color: transparentize($fg_color, 0.9);
8482
$_base_hover_color: transparentize($fg_color, 0.85);
8583
$_base_active_color: transparentize($fg_color, 0.75);
8684

87-
min-height: 20px;
88-
min-width: 20px;
89-
padding: 2px;
90-
margin: 0 3px;
85+
> image {
86+
min-height: 20px;
87+
min-width: 20px;
88+
padding: 2px;
89+
margin: 0 3px;
90+
91+
background: $_base_button_color;
92+
}
9193

92-
background: $_base_button_color;
94+
&:hover > image {
95+
//special case hover colors inside a headerbar
96+
@include button(undecorated-hover,$c:$_base_hover_color);
97+
}
9398

94-
&:hover {
95-
background: $_base_hover_color;
99+
&:active > image,
100+
&:checked > image {
101+
@include button(undecorated-active,$c:$_base_active_color);
96102
}
97103

104+
&:hover,
98105
&:active,
99106
&:checked {
100-
background: $_base_active_color;
107+
background: none;
101108
}
102109
}
103110
}

0 commit comments

Comments
 (0)