From a1beac4c0564c49e8117c7871d216bb0f04d652a Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sat, 17 Aug 2024 13:13:41 -0700 Subject: [PATCH] Added the ability to change the layer of the bar (#146) --- modules/bar/Bar.ts | 1 + options.ts | 1 + widget/settings/pages/config/bar/index.ts | 1 + widget/settings/shared.ts | 0 4 files changed, 3 insertions(+) delete mode 100644 widget/settings/shared.ts diff --git a/modules/bar/Bar.ts b/modules/bar/Bar.ts index 65f06e8..7984ea9 100644 --- a/modules/bar/Bar.ts +++ b/modules/bar/Bar.ts @@ -229,6 +229,7 @@ export const Bar = (() => { visible: true, anchor: ["top", "left", "right"], exclusivity: "exclusive", + layer: options.theme.bar.layer.bind("value"), child: Widget.Box({ class_name: 'bar-panel-container', child: Widget.CenterBox({ diff --git a/options.ts b/options.ts index 539acca..5db3588 100644 --- a/options.ts +++ b/options.ts @@ -120,6 +120,7 @@ const options = mkOptions(OPTIONS, { }, bar: { floating: opt(false), + layer: opt<"top" | "bottom" | "overlay" | "background">("top"), margin_top: opt("0.5em"), opacity: opt(100), margin_bottom: opt("0em"), diff --git a/widget/settings/pages/config/bar/index.ts b/widget/settings/pages/config/bar/index.ts index ebd7c8e..4526275 100644 --- a/widget/settings/pages/config/bar/index.ts +++ b/widget/settings/pages/config/bar/index.ts @@ -19,6 +19,7 @@ export const BarSettings = () => { Option({ opt: options.theme.bar.buttons.spacing, title: 'Button Spacing', subtitle: 'Spacing between the buttons in the bar.', type: 'string' }), Option({ opt: options.theme.bar.buttons.radius, title: 'Button Radius', type: 'string' }), Option({ opt: options.theme.bar.floating, title: 'Floating Bar', type: 'boolean' }), + Option({ opt: options.theme.bar.layer, title: 'Layer', type: 'enum', subtitle: 'Layer determines the Z index of your bar.', enums: ["top", "bottom", "overlay", "background"] }), Option({ opt: options.theme.bar.margin_top, title: 'Margin Top', subtitle: 'Only applies if floating is enabled', type: 'string' }), Option({ opt: options.theme.bar.margin_bottom, title: 'Margin Bottom', subtitle: 'Only applies if floating is enabled', type: 'string' }), Option({ opt: options.theme.bar.margin_sides, title: 'Margin Sides', subtitle: 'Only applies if floating is enabled', type: 'string' }), diff --git a/widget/settings/shared.ts b/widget/settings/shared.ts deleted file mode 100644 index e69de29..0000000