Skip to content

Commit

Permalink
BUGfix: GTK3 & GTK4 - sharp window corners
Browse files Browse the repository at this point in the history
  • Loading branch information
thekomer committed Dec 14, 2021
1 parent 489915c commit 437ae2e
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 24 deletions.
4 changes: 4 additions & 0 deletions gtk-3.0/gtk-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,10 @@ window:not(.tiled):not(.maximized) headerbar:first-child {
window:not(.tiled):not(.maximized) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized) headerbar:last-child {
border-top-right-radius: 4px; }

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px; }

window.csd > .titlebar:not(headerbar) {
padding: 0;
background-color: transparent;
Expand Down
53 changes: 29 additions & 24 deletions gtk-3.0/gtk.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:color";
/*$selected_bg_color: #00e8c6;06d6a0*/
/* GTK NAMED COLORS
----------------
Expand Down Expand Up @@ -535,10 +536,10 @@ button.osd {
outline-color: rgba(254, 254, 254, 0.3);
border: none;
box-shadow: none; }

button.osd.image-button {
min-width: 32px; }

button.osd:hover {
color: white;
border-color: rgba(255, 255, 255, 0.15);
Expand All @@ -550,7 +551,7 @@ button.osd {
outline-color: rgba(254, 254, 254, 0.3);
border: none;
box-shadow: none; }

button.osd:active,
button.osd:checked {
color: white;
Expand All @@ -563,7 +564,7 @@ button.osd {
outline-color: rgba(254, 254, 254, 0.3);
border: none;
box-shadow: none; }

button.osd:disabled:backdrop,
button.osd:disabled {
color: #898b8c;
Expand All @@ -574,7 +575,7 @@ button.osd {
text-shadow: none;
-gtk-icon-shadow: none;
border: none; }

button.osd:backdrop {
color: #fefefe;
border-color: rgba(255, 255, 255, 0.15);
Expand Down Expand Up @@ -719,13 +720,13 @@ button.suggested-action {
color: white;
border-radius: 100px;
background: linear-gradient(to right, #e87e33 0%, #ff6a00 100%); }

button.suggested-action:hover {
color: white;
background: rgba(0, 193, 228, 0.5);
outline-color: rgba(255, 255, 255, 0.3);
text-shadow: none; }

button.suggested-action:active,
button.suggested-action:checked {
color: white;
Expand Down Expand Up @@ -789,20 +790,20 @@ button.suggested-action {
text-shadow: none;
-gtk-icon-shadow: none;
color: rgba(0, 193, 228, 0.8); }

button.suggested-action:disabled {
color: white;
outline-color: rgba(255, 255, 255, 0.3);
background-color: #00c1e4;
text-shadow: none; }

button.suggested-action:disabled:active,
button.suggested-action:disabled:checked {
color: rgba(254, 254, 254, 0.7);
outline-color: rgba(255, 255, 255, 0.3);
background-color: #00c1e4;
text-shadow: none; }

button.suggested-action:disabled:active label,
button.suggested-action:disabled:checked label {
color: rgba(254, 254, 254, 0.7); }
Expand Down Expand Up @@ -866,37 +867,37 @@ button.destructive-action {
color: white;
border-radius: 100px;
background: linear-gradient(to right, #FF416C, #FF4B2B); }

button.destructive-action.flat {
box-shadow: none;
color: white;
border-radius: 100px;
background: linear-gradient(to right, #e87e33 0%, #ff6a00 100%); }

button.destructive-action:hover {
color: white;
background: rgba(204, 0, 0, 0.5);
outline-color: rgba(255, 255, 255, 0.3);
text-shadow: none; }

button.destructive-action:active,
button.destructive-action:checked {
color: white;
outline-color: rgba(255, 255, 255, 0.3);
background-color: #cc0000;
text-shadow: none; }

button.destructive-action:backdrop,
button.destructive-action.flat:backdrop {
color: rgba(255, 255, 255, 0.4);
outline-color: rgba(255, 255, 255, 0.3);
background-color: #cc0000;
text-shadow: none; }

button.destructive-action:backdrop label,
button.destructive-action.flat:backdrop label {
color: rgba(255, 255, 255, 0.5); }

button.destructive-action:backdrop:active,
button.destructive-action:backdrop:checked,
button.destructive-action.flat:backdrop:active,
Expand All @@ -905,24 +906,24 @@ button.destructive-action {
outline-color: rgba(255, 255, 255, 0.3);
background-color: rgba(255, 106, 0, 0.6);
text-shadow: none; }

button.destructive-action:backdrop:active label,
button.destructive-action:backdrop:checked label,
button.destructive-action.flat:backdrop:active label,
button.destructive-action.flat:backdrop:checked label {
color: rgba(254, 254, 254, 0.7); }

button.destructive-action:backdrop:disabled,
button.destructive-action.flat:backdrop:disabled {
color: white;
outline-color: rgba(255, 255, 255, 0.3);
background-color: #cc0000;
text-shadow: none; }

button.destructive-action:backdrop:disabled label,
button.destructive-action.flat:backdrop:disabled label {
color: rgba(255, 255, 255, 0.5); }

button.destructive-action:backdrop:disabled:active,
button.destructive-action:backdrop:disabled:checked,
button.destructive-action.flat:backdrop:disabled:active,
Expand All @@ -931,7 +932,7 @@ button.destructive-action {
outline-color: rgba(255, 255, 255, 0.3);
background-color: rgba(255, 106, 0, 0.6);
text-shadow: none; }

button.destructive-action.flat:backdrop,
button.destructive-action.flat:disabled,
button.destructive-action.flat:backdrop:disabled {
Expand All @@ -942,20 +943,20 @@ button.destructive-action {
text-shadow: none;
-gtk-icon-shadow: none;
color: rgba(204, 0, 0, 0.8); }

button.destructive-action:disabled {
color: white;
outline-color: rgba(255, 255, 255, 0.3);
background-color: #cc0000;
text-shadow: none; }

button.destructive-action:disabled:active,
button.destructive-action:disabled:checked {
color: rgba(254, 254, 254, 0.7);
outline-color: rgba(255, 255, 255, 0.3);
background-color: #cc0000;
text-shadow: none; }

button.destructive-action:disabled:active label,
button.destructive-action:disabled:checked label {
color: rgba(254, 254, 254, 0.7); }
Expand Down Expand Up @@ -2732,6 +2733,10 @@ window:not(.tiled):not(.maximized) headerbar:first-child {
window:not(.tiled):not(.maximized) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized) headerbar:last-child {
border-top-right-radius: 4px; }

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px; }

window.csd > .titlebar:not(headerbar) {
padding: 0;
background-color: transparent;
Expand Down
5 changes: 5 additions & 0 deletions gtk-3.0/widgets/_header-bars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ headerbar {
window:not(.tiled):not(.maximized) &:last-child { &:backdrop, & { border-top-right-radius: 4px; }}
}

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}

.titlebar:not(headerbar) {
window.csd > & {
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
Expand Down
4 changes: 4 additions & 0 deletions gtk-4.0/gtk-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2710,6 +2710,10 @@ window:not(.tiled):not(.maximized) headerbar:first-child {
window:not(.tiled):not(.maximized) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized) headerbar:last-child {
border-top-right-radius: 4px; }

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px; }

window.csd > .titlebar:not(headerbar) {
padding: 0;
background-color: transparent;
Expand Down
4 changes: 4 additions & 0 deletions gtk-4.0/gtk.css
Original file line number Diff line number Diff line change
Expand Up @@ -2710,6 +2710,10 @@ window:not(.tiled):not(.maximized) headerbar:first-child {
window:not(.tiled):not(.maximized) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized) headerbar:last-child {
border-top-right-radius: 4px; }

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px; }

window.csd > .titlebar:not(headerbar) {
padding: 0;
background-color: transparent;
Expand Down
5 changes: 5 additions & 0 deletions gtk-4.0/widgets/_header-bars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ headerbar {
window:not(.tiled):not(.maximized) &:last-child { &:backdrop, & { border-top-right-radius: 4px; }}
}

window {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}

.titlebar:not(headerbar) {
window.csd > & {
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
Expand Down

0 comments on commit 437ae2e

Please sign in to comment.