Added shadows to the Bar, Menus, OSD and Notifications. (#777)
* Added shadows to the Bar, Menus and notifications. * Add OSD shadows
This commit is contained in:
@@ -3,7 +3,7 @@ import { DropdownMenuProps } from 'src/lib/types/dropdownmenu';
|
||||
import { BarEventMargins } from './eventBoxes/index';
|
||||
import { globalEventBoxes } from 'src/globals/dropdown';
|
||||
import { bind } from 'astal';
|
||||
import { App, Astal, Gdk } from 'astal/gtk3';
|
||||
import { App, Astal, Gdk, Gtk } from 'astal/gtk3';
|
||||
import { Revealer } from 'astal/gtk3/widget';
|
||||
import { locationMap } from 'src/lib/types/defaults/bar';
|
||||
|
||||
@@ -88,7 +88,7 @@ export default ({
|
||||
transitionType={transition}
|
||||
transitionDuration={bind(options.menus.transitionTime)}
|
||||
>
|
||||
<box className="dropdown-menu-container" canFocus>
|
||||
<box className="dropdown-content" halign={Gtk.Align.CENTER} expand canFocus>
|
||||
{child}
|
||||
</box>
|
||||
</revealer>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
import { Header } from 'src/components/settings/shared/Header';
|
||||
import options from 'src/options';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { Option } from 'src/components/settings/shared/Option';
|
||||
|
||||
export const BarSettings = (): JSX.Element => {
|
||||
return (
|
||||
@@ -53,6 +53,18 @@ export const BarSettings = (): JSX.Element => {
|
||||
enums={['none', 'full', 'top', 'right', 'bottom', 'left', 'horizontal', 'vertical']}
|
||||
/>
|
||||
<Option opt={options.theme.bar.border.width} title="Bar Border Width" type="string" />
|
||||
<Option
|
||||
opt={options.theme.bar.shadow}
|
||||
title="Bar Shadow"
|
||||
subtitle="Requires that sufficient margins have been set to house the shadow."
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.theme.bar.shadowMargins}
|
||||
title="Bar Shadow Margins"
|
||||
subtitle="Margins count mouse events as clicks 'inside' the menu."
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.theme.bar.border_radius}
|
||||
title="Border Radius"
|
||||
|
||||
@@ -65,6 +65,18 @@ export const BarGeneral = (): JSX.Element => {
|
||||
max={10000}
|
||||
increment={25}
|
||||
/>
|
||||
<Option
|
||||
opt={options.theme.bar.menus.shadow}
|
||||
title="Menu Shadow"
|
||||
subtitle="Requires that sufficient margins have been set to house the shadow."
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.theme.bar.menus.shadowMargins}
|
||||
title="Menu Shadow Margins"
|
||||
subtitle="Margins count mouse events as clicks 'inside' the menu."
|
||||
type="string"
|
||||
/>
|
||||
|
||||
<Header title="Scaling" />
|
||||
<Option
|
||||
|
||||
@@ -22,6 +22,17 @@ export const NotificationSettings = (): JSX.Element => {
|
||||
enums={['top left', 'top', 'top right', 'right', 'bottom right', 'bottom', 'bottom left', 'left']}
|
||||
/>
|
||||
<Option opt={options.theme.notification.border_radius} title="Border Radius" type="string" />
|
||||
<Option
|
||||
opt={options.theme.notification.shadow}
|
||||
title="Notification Shadow"
|
||||
subtitle="Requires that sufficient margins have been set to house the shadow."
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.theme.notification.shadowMargins}
|
||||
title="Notification Shadow Margins"
|
||||
type="string"
|
||||
/>
|
||||
<Option
|
||||
opt={options.notifications.monitor}
|
||||
title="Monitor"
|
||||
|
||||
@@ -48,6 +48,13 @@ export const OSDSettings = (): JSX.Element => {
|
||||
subtitle="Format: top right bottom left"
|
||||
type="string"
|
||||
/>
|
||||
|
||||
<Option
|
||||
opt={options.theme.osd.shadow}
|
||||
title="OSD Shadow"
|
||||
subtitle="Requires that sufficient margins have been set to house the shadow."
|
||||
type="string"
|
||||
/>
|
||||
<Option opt={options.theme.osd.border.size} title="Border Size" type="string" />
|
||||
<Option opt={options.theme.osd.radius} title="Radius" subtitle="Radius of the OSD" type="string" />
|
||||
<Option
|
||||
|
||||
Reference in New Issue
Block a user