Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Adw.ToolbarView #1284

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions src/gtk-4.0/widgets/adw/ToolbarView.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
@function undershoot-gradient ($direction) {
@return linear-gradient(
$direction,
#{'@borders'},
rgba(black, 0.05) 1px,
rgba(black, 0.0) rem(3px)
);
}

toolbarview {
&.undershoot-top scrolledwindow {
overshoot.top {
background:
overshoot-gradient(to top),
undershoot-gradient(to bottom);

&:backdrop {
background:
overshoot-gradient-backdrop(to top),
undershoot-gradient(to bottom);
}
}

undershoot.top {
background: undershoot-gradient(to bottom);
}
}

&.undershoot-bottom scrolledwindow {
overshoot.bottom {
background:
overshoot-gradient(to bottom),
undershoot-gradient(to top);

&:backdrop {
background:
overshoot-gradient-backdrop(to bottom),
undershoot-gradient(to bottom);
}
}

undershoot.bottom {
background: undershoot-gradient(to top);
}
}

revealer.top-bar headerbar,
revealer.top-bar headerbar:backdrop,
revealer.bottom-bar actionbar,
revealer.bottom-bar actionbar:backdrop {
background: inherit;
box-shadow: none;
border-radius: 0;
}

revealer.top-bar {
&.raised {
box-shadow:
outset-highlight(),
// Intentionally not in ems since it's used as a stroke
0 1px 0 0 #{'alpha(@borders, 0.4)'},
0 1px rem(2px) rgba(black, 0.2);

&:backdrop {
box-shadow:
outset-highlight(),
0 0 0 1px #{'alpha(@borders, 0.3)'},
0 1px rem(2px) rgba(black, 0.15);
}
}

&.raised.border {
box-shadow:
outset-highlight(),
// Intentionally not in ems since it's used as a stroke
0 1px 0 0 #{'alpha(@borders, 0.8)'};
}
}
}
1 change: 1 addition & 0 deletions src/gtk-4.0/widgets/adw/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import 'MessageDialog.scss';
@import 'PreferencesWindow.scss';
@import 'StatusPage.scss';
@import 'ToolbarView.scss';
@import 'TabBar.scss';
@import 'TabOverview.scss';
@import 'ViewSwitcher.scss';